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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2196>
This commit is contained in:
Guillaume Desmottes 2022-04-15 16:38:46 +02:00 committed by GStreamer Marge Bot
parent e482b995fb
commit 7933fff83c

View file

@ -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;