diff mbox series

[FFmpeg-devel,v2,4/5] avdevice/dshow: only set pin format if wanted

Message ID 20220102094940.1765-5-dcnieho@gmail.com
State Accepted, archived
Headers show
Series avdevice/dshow fixups | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Diederick C. Niehorster Jan. 2, 2022, 9:49 a.m. UTC
Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
---
 libavdevice/dshow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 4b6887881d..f2d95fa470 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -1046,7 +1046,7 @@  next:
     // format based on the VIDEOINFOHEADER format.
     // NB: this never applies to an audio format because
     // previous_match_type always NULL in that case
-    if (!format_set && previous_match_type) {
+    if (pformat_set && !format_set && previous_match_type) {
         if (IAMStreamConfig_SetFormat(config, previous_match_type) == S_OK)
             format_set = 1;
     }