schroedinger: fix video codec state leaks

This commit is contained in:
Vincent Penquerc'h 2012-06-07 11:52:12 +01:00
parent 8e75a04fea
commit c61725c982
2 changed files with 5 additions and 1 deletions

View file

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

View file

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