diff options
author | Diederick Niehorster <dcnieho@gmail.com> | 2022-01-02 10:49:37 +0100 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2022-01-04 17:40:47 +0530 |
commit | 307d2b867f35cb18f9ff6085f7e5298c3f0be278 (patch) | |
tree | 821fa8952ee66baeb4730c1442a4dbf7aae57601 /libavdevice | |
parent | d1f7700133312929d64aaa69ab3a08b5ae171390 (diff) | |
download | ffmpeg-307d2b867f35cb18f9ff6085f7e5298c3f0be278.tar.gz |
avdevice/dshow: proper cleanup of queried media types
Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/dshow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 30f1be1ead..4b6887881d 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -953,7 +953,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype, av_log(avctx, AV_LOG_INFO, "(%s)", chroma ? chroma : "unknown"); av_log(avctx, AV_LOG_INFO, "\n"); - continue; + goto next; } if (requested_video_codec_id != AV_CODEC_ID_RAWVIDEO) { if (requested_video_codec_id != fmt_info->codec_id) @@ -1038,6 +1038,7 @@ next: if (type && type->pbFormat) CoTaskMemFree(type->pbFormat); CoTaskMemFree(type); + type = NULL; } // previously found a matching VIDEOINFOHEADER format and stored // it for safe keeping. Searching further for a matching |