diff --git a/ext/schroedinger/gstschrodec.c b/ext/schroedinger/gstschrodec.c index 475a7887d2..77ce8a3ba5 100644 --- a/ext/schroedinger/gstschrodec.c +++ b/ext/schroedinger/gstschrodec.c @@ -198,7 +198,7 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size) { SchroVideoFormat video_format; int ret; - GstVideoCodecState *state; + GstVideoCodecState *state = NULL; int bit_depth; GstVideoFormat fmt = GST_VIDEO_FORMAT_UNKNOWN; @@ -259,6 +259,8 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size) state->info.par_d); beach: + if (state) + gst_video_codec_state_unref (state); gst_schrodec_send_tags (schro_dec); } diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index cdab5ab986..48907a4880 100644 --- a/ext/schroedinger/gstschroenc.c +++ b/ext/schroedinger/gstschroenc.c @@ -242,6 +242,8 @@ gst_schro_enc_finalize (GObject * object) g_free (schro_enc->video_format); schro_enc->video_format = NULL; } + if (schro_enc->input_state) + gst_video_codec_state_unref (schro_enc->input_state); G_OBJECT_CLASS (parent_class)->finalize (object); }