[FFmpeg-devel] [PATCH 14/17] avdevice/dshow: Cleanup also on av_log case

Michael Niedermayer michael at niedermayer.cc
Mon May 27 02:52:26 EEST 2024


Fixes: CID1598550 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavdevice/dshow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 557cf33161e..645c33ea2e6 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -1001,7 +1001,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype,
                     "  ch=%2u, bits=%2u, rate=%6lu\n",
                     fx->nChannels, fx->wBitsPerSample, fx->nSamplesPerSec
                 );
-                continue;
+                goto next;
             }
             if (
                 (requested_sample_rate && requested_sample_rate != fx->nSamplesPerSec) ||
-- 
2.45.1



More information about the ffmpeg-devel mailing list