From 6b024b50ab51fff2b5db6d2973c7d8f4aa898c47 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 14 Feb 2024 22:11:51 +0100 Subject: [PATCH] v4l2codecs: h264: Fix a memory leak on renegotiation We only use this anchor when streaming, in which case output_state is set and needs to get unreffed. This is in line with how it is handled for all other codecs. Part-of: --- .../gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c index 190708653f..41b1f843bd 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c @@ -367,10 +367,10 @@ gst_v4l2_codec_h264_dec_negotiate (GstVideoDecoder * decoder) } gst_caps_unref (caps); +done: if (self->output_state) gst_video_codec_state_unref (self->output_state); -done: self->output_state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (self), self->vinfo.finfo->format, self->display_width,