From 7933fff83cff711330402252b69a6a934fe6c67c Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 15 Apr 2022 16:38:46 +0200 Subject: [PATCH] libav: fix frame leak on negotiation error The function owns a reference on the frame. Drop it if negotiation failed as we are already doing for the other error cases. Part-of: --- subprojects/gst-libav/ext/libav/gstavviddec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-libav/ext/libav/gstavviddec.c b/subprojects/gst-libav/ext/libav/gstavviddec.c index 304dec5dfe..b957d22ea0 100644 --- a/subprojects/gst-libav/ext/libav/gstavviddec.c +++ b/subprojects/gst-libav/ext/libav/gstavviddec.c @@ -1887,6 +1887,7 @@ no_output: negotiation_error: { + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (ffmpegdec), out_frame); if (GST_PAD_IS_FLUSHING (GST_VIDEO_DECODER_SRC_PAD (ffmpegdec))) { *ret = GST_FLOW_FLUSHING; goto beach;