avdevice/dshow: only set pin format if wanted

Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
pull/383/head
Diederick Niehorster 3 years ago committed by Gyan Doshi
parent 76e164f332
commit 25518f2aa6
  1. 2
      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;
}

Loading…
Cancel
Save