diff mbox series

[FFmpeg-devel,1/2] avdevice/dshow: remove unused variables

Message ID 20220413161515.6999-1-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/2] avdevice/dshow: remove unused variables | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer April 13, 2022, 4:15 p.m. UTC
Remnant from f125c504d8fece6420bb97767f9e72414c26312a

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavdevice/dshow.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Roger Pack April 19, 2022, 6:10 a.m. UTC | #1
LGTM.

On Wed, Apr 13, 2022 at 10:15 AM James Almer <jamrial@gmail.com> wrote:
>
> Remnant from f125c504d8fece6420bb97767f9e72414c26312a
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavdevice/dshow.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> index 1e69620880..ac8b64366f 100644
> --- a/libavdevice/dshow.c
> +++ b/libavdevice/dshow.c
> @@ -814,10 +814,6 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
>                                                                      / ctx->requested_framerate.num : 0;
>      int requested_width                       = ctx->requested_width;
>      int requested_height                      = ctx->requested_height;
> -    // audio
> -    int requested_sample_rate                 = ctx->sample_rate;
> -    int requested_sample_size                 = ctx->sample_size;
> -    int requested_channels                    = ctx->channels;
>
>      if (IPin_QueryInterface(pin, &IID_IAMStreamConfig, (void **) &config) != S_OK)
>          return;
> @@ -854,10 +850,6 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
>                      requested_framerate      = fmt_info->framerate;
>                      requested_width          = fmt_info->width;
>                      requested_height         = fmt_info->height;
> -                } else {
> -                    requested_sample_rate = fmt_info->sample_rate;
> -                    requested_sample_size = fmt_info->sample_size;
> -                    requested_channels    = fmt_info->channels;
>                  }
>                  av_free(fmt_info);  // free but don't set to NULL to enable below check
>              }
> --
> 2.35.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Diederick C. Niehorster April 19, 2022, 7:09 a.m. UTC | #2
On Tue, Apr 19, 2022 at 8:10 AM Roger Pack <rogerdpack2@gmail.com> wrote:
>
> LGTM.

Not LGTM, see below

> On Wed, Apr 13, 2022 at 10:15 AM James Almer <jamrial@gmail.com> wrote:
> >
> > Remnant from f125c504d8fece6420bb97767f9e72414c26312a
> >
> > Signed-off-by: James Almer <jamrial@gmail.com>
> > ---
> >  libavdevice/dshow.c | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> > index 1e69620880..ac8b64366f 100644
> > --- a/libavdevice/dshow.c
> > +++ b/libavdevice/dshow.c
> > @@ -814,10 +814,6 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
> >                                                                      / ctx->requested_framerate.num : 0;
> >      int requested_width                       = ctx->requested_width;
> >      int requested_height                      = ctx->requested_height;
> > -    // audio
> > -    int requested_sample_rate                 = ctx->sample_rate;
> > -    int requested_sample_size                 = ctx->sample_size;
> > -    int requested_channels                    = ctx->channels;
> >
> >      if (IPin_QueryInterface(pin, &IID_IAMStreamConfig, (void **) &config) != S_OK)
> >          return;
> > @@ -854,10 +850,6 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
> >                      requested_framerate      = fmt_info->framerate;
> >                      requested_width          = fmt_info->width;
> >                      requested_height         = fmt_info->height;
> > -                } else {
> > -                    requested_sample_rate = fmt_info->sample_rate;
> > -                    requested_sample_size = fmt_info->sample_size;
> > -                    requested_channels    = fmt_info->channels;
> >                  }
> >                  av_free(fmt_info);  // free but don't set to NULL to enable below check
> >              }

These should be used further down when checking audio formats. I'll
send a patch.

Cheers,
Dee
diff mbox series

Patch

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 1e69620880..ac8b64366f 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -814,10 +814,6 @@  dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
                                                                     / ctx->requested_framerate.num : 0;
     int requested_width                       = ctx->requested_width;
     int requested_height                      = ctx->requested_height;
-    // audio
-    int requested_sample_rate                 = ctx->sample_rate;
-    int requested_sample_size                 = ctx->sample_size;
-    int requested_channels                    = ctx->channels;
 
     if (IPin_QueryInterface(pin, &IID_IAMStreamConfig, (void **) &config) != S_OK)
         return;
@@ -854,10 +850,6 @@  dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
                     requested_framerate      = fmt_info->framerate;
                     requested_width          = fmt_info->width;
                     requested_height         = fmt_info->height;
-                } else {
-                    requested_sample_rate = fmt_info->sample_rate;
-                    requested_sample_size = fmt_info->sample_size;
-                    requested_channels    = fmt_info->channels;
                 }
                 av_free(fmt_info);  // free but don't set to NULL to enable below check
             }