h264parse: Free the PPS buffers too
This commit is contained in:
parent
d520e426b0
commit
baced65049
@ -304,6 +304,7 @@ gst_h264_parse_get_sps (GstH264Parse * h, guint8 sps_id)
|
|||||||
h->sps = h->sps_buffers[sps_id] = sps;
|
h->sps = h->sps_buffers[sps_id] = sps;
|
||||||
return sps;
|
return sps;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstH264Pps *
|
static GstH264Pps *
|
||||||
gst_h264_parse_get_pps (GstH264Parse * h, guint8 pps_id)
|
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]);
|
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);
|
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)
|
if (outbuf_dts != GST_CLOCK_TIME_NONE)
|
||||||
h264parse->dts = outbuf_dts;
|
h264parse->dts = outbuf_dts;
|
||||||
else if (h264parse->dts != GST_CLOCK_TIME_NONE)
|
else if (h264parse->dts != GST_CLOCK_TIME_NONE)
|
||||||
h264parse->dts +=
|
h264parse->dts += (GstClockTime)
|
||||||
(GstClockTime) gst_util_uint64_scale_int (h264parse->
|
gst_util_uint64_scale_int (h264parse->cur_duration * GST_SECOND,
|
||||||
cur_duration * GST_SECOND, sps->num_units_in_tick,
|
sps->num_units_in_tick, sps->time_scale);
|
||||||
sps->time_scale);
|
|
||||||
else
|
else
|
||||||
h264parse->dts = 0; /* initialization */
|
h264parse->dts = 0; /* initialization */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user