diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-08-18 12:14:46 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-08-31 09:15:09 +0200 |
commit | baced65049dee113d577502f154e9c24b0c1bb4b (patch) | |
tree | a4fd8c32cae6963891eadb7099ea685934a22eff /gst/h264parse | |
parent | d520e426b0ea159d0df7e39e436eb2200a996f66 (diff) |
h264parse: Free the PPS buffers too
Diffstat (limited to 'gst/h264parse')
-rw-r--r-- | gst/h264parse/gsth264parse.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gst/h264parse/gsth264parse.c b/gst/h264parse/gsth264parse.c index 1775286d8..98cde1361 100644 --- a/gst/h264parse/gsth264parse.c +++ b/gst/h264parse/gsth264parse.c @@ -304,6 +304,7 @@ gst_h264_parse_get_sps (GstH264Parse * h, guint8 sps_id) h->sps = h->sps_buffers[sps_id] = sps; return sps; } + static GstH264Pps * gst_h264_parse_get_pps (GstH264Parse * h, guint8 pps_id) { @@ -865,6 +866,11 @@ gst_h264_parse_finalize (GObject * object) 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]); + } + G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -1242,10 +1248,9 @@ gst_h264_parse_chain_forward (GstH264Parse * h264parse, gboolean discont, if (outbuf_dts != GST_CLOCK_TIME_NONE) h264parse->dts = outbuf_dts; else if (h264parse->dts != GST_CLOCK_TIME_NONE) - h264parse->dts += - (GstClockTime) gst_util_uint64_scale_int (h264parse-> - cur_duration * GST_SECOND, sps->num_units_in_tick, - sps->time_scale); + h264parse->dts += (GstClockTime) + gst_util_uint64_scale_int (h264parse->cur_duration * GST_SECOND, + sps->num_units_in_tick, sps->time_scale); else h264parse->dts = 0; /* initialization */ |