From 43fb350c4285179ceda498ee65effe71d6698ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 23 Feb 2024 13:16:36 +0200 Subject: [PATCH] theoradec: Don't leak input state if a second type packet is received Part-of: --- subprojects/gst-plugins-base/ext/theora/gsttheoradec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c b/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c index 3d65e02607..66e6edd1eb 100644 --- a/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c +++ b/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c @@ -487,6 +487,8 @@ theora_handle_type_packet (GstTheoraDec * dec) } /* Create the output state */ + if (dec->output_state) + gst_video_codec_state_unref (dec->output_state); dec->output_state = state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), fmt, width, height, dec->input_state);