[FFmpeg-devel] [PATCH 2/2] Fix missing PCM sample size option when it is used as the lone option for DirectShow audio capture

Brad Isbell brad at audiopump.co
Thu Nov 4 20:03:54 EET 2021


Brad Isbell // AudioPump, Inc.
brad at audiopump.co
Skype: bradisbell
Phone: +1 312-488-4680


On Thu, Nov 4, 2021 at 12:21 PM Brad Isbell <brad at audiopump.co> wrote:
>
> Re-sending with correct line endings.  Thanks!
>
>
>
> From 25e34ef9f995afffe67e519bb6f03a750aa09ae2 Mon Sep 17 00:00:00 2001
> From: Brad Isbell <brad at audiopump.co>
> Date: Wed, 3 Nov 2021 20:38:59 -0500
> Subject: [PATCH 2/2] Fix missing PCM sample size option when it is used as the
>  lone option for DirectShow audio capture
>
> Signed-off-by: Brad Isbell <brad at audiopump.co>
> ---
>  libavdevice/dshow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> index 5c1e494..e313c9a 100644
> --- a/libavdevice/dshow.c
> +++ b/libavdevice/dshow.c
> @@ -569,7 +569,7 @@ dshow_cycle_pins(AVFormatContext *avctx, enum
> dshowDeviceType devtype,
>                                                  (ctx->requested_width
> && ctx->requested_height) ||
>                                                   ctx->pixel_format !=
> AV_PIX_FMT_NONE ||
>                                                   ctx->video_codec_id
> != AV_CODEC_ID_RAWVIDEO))
> -                  || (devtype == AudioDevice && (ctx->channels ||
> ctx->sample_rate));
> +                  || (devtype == AudioDevice && (ctx->channels ||
> ctx->sample_rate || ctx->sample_size));
>      int format_set = 0;
>      int should_show_properties = (devtype == VideoDevice) ?
> ctx->show_video_device_dialog : ctx->show_audio_device_dialog;
>
> --
> 2.32.0.windows.1
>
>
>
> On Thu, Nov 4, 2021 at 5:53 AM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > On Wed, Nov 03, 2021 at 10:41:24PM -0600, Roger Pack wrote:
> > > I have looked at these two patches and they look good to me, if
> > > anybody could commit them for me, that would be great.
> >
> > The patches are corrupted
> > Applying: Use WAVEFORMATEX from AM_MEDIA_TYPE for describing device capabilities. (Fixes #9420)
> > error: corrupt patch at line 10
> > error: could not build fake ancestor
> > Patch failed at 0001 Use WAVEFORMATEX from AM_MEDIA_TYPE for describing device capabilities. (Fixes #9420)
> >
> > [...]
> > --
> > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > The bravest are surely those who have the clearest vision
> > of what is before them, glory and danger alike, and yet
> > notwithstanding go out to meet it. -- Thucydides
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
From 25e34ef9f995afffe67e519bb6f03a750aa09ae2 Mon Sep 17 00:00:00 2001
From: Brad Isbell <brad at audiopump.co>
Date: Wed, 3 Nov 2021 20:38:59 -0500
Subject: [PATCH 2/2] Fix missing PCM sample size option when it is used as the
 lone option for DirectShow audio capture

Signed-off-by: Brad Isbell <brad at audiopump.co>
---
 libavdevice/dshow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 5c1e494..e313c9a 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -569,7 +569,7 @@ dshow_cycle_pins(AVFormatContext *avctx, enum dshowDeviceType devtype,
                                                 (ctx->requested_width && ctx->requested_height) ||
                                                  ctx->pixel_format != AV_PIX_FMT_NONE ||
                                                  ctx->video_codec_id != AV_CODEC_ID_RAWVIDEO))
-                  || (devtype == AudioDevice && (ctx->channels || ctx->sample_rate));
+                  || (devtype == AudioDevice && (ctx->channels || ctx->sample_rate || ctx->sample_size));
     int format_set = 0;
     int should_show_properties = (devtype == VideoDevice) ? ctx->show_video_device_dialog : ctx->show_audio_device_dialog;
 
-- 
2.32.0.windows.1



More information about the ffmpeg-devel mailing list