diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-12-07 14:55:15 +0100 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2010-12-08 16:30:12 +0100 |
commit | 26d69e63d49d9865d8265e6ab767786f984302a3 (patch) | |
tree | deaef9b66c057e0d6667c86ab3806f26aece75f5 /gst/h264parse | |
parent | 6f966febce5f245c0d97ba4b6cb7a3a675a6b006 (diff) |
h264parse: re-use reset() in finalize()
Diffstat (limited to 'gst/h264parse')
-rw-r--r-- | gst/h264parse/gsth264parse.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/gst/h264parse/gsth264parse.c b/gst/h264parse/gsth264parse.c index 6922fb7f7..b44bcc0d4 100644 --- a/gst/h264parse/gsth264parse.c +++ b/gst/h264parse/gsth264parse.c @@ -1031,30 +1031,14 @@ static void gst_h264_parse_finalize (GObject * object) { GstH264Parse *h264parse; - gint i; h264parse = GST_H264PARSE (object); + gst_h264_parse_reset (h264parse); + g_object_unref (h264parse->adapter); g_object_unref (h264parse->picture_adapter); - for (i = 0; i < MAX_SPS_COUNT; i++) { - if (h264parse->sps_buffers[i] != NULL) - g_slice_free (GstH264Sps, h264parse->sps_buffers[i]); - } - - for (i = 0; i < MAX_PPS_COUNT; i++) { - if (h264parse->pps_buffers[i] != NULL) - g_slice_free (GstH264Pps, h264parse->pps_buffers[i]); - } - - if (h264parse->pending_segment) - gst_event_replace (&h264parse->pending_segment, NULL); - - g_list_foreach (h264parse->pending_events, (GFunc) gst_event_unref, NULL); - g_list_free (h264parse->pending_events); - h264parse->pending_events = NULL; - G_OBJECT_CLASS (parent_class)->finalize (object); } |