From 25518f2aa6821cd37bb20b53853eb1b2ef95b755 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Sun, 2 Jan 2022 10:49:39 +0100 Subject: [PATCH] avdevice/dshow: only set pin format if wanted Signed-off-by: Diederick Niehorster Reviewed-by: Roger Pack --- libavdevice/dshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }