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/2217>
This commit is contained in:
Guillaume Desmottes 2022-04-15 16:38:46 +02:00 committed by Tim-Philipp Müller
parent 86e46e6c83
commit 7aa763cab7

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;