mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
tsdemux: only free the index array if it exists
Only free the array if it exists. Contains an unrelated indentation fix, courtesy of gst-indent
This commit is contained in:
parent
d04efbd735
commit
ca8ea19cc3
1 changed files with 5 additions and 3 deletions
|
@ -305,8 +305,10 @@ static void
|
||||||
gst_ts_demux_reset (MpegTSBase * base)
|
gst_ts_demux_reset (MpegTSBase * base)
|
||||||
{
|
{
|
||||||
GstTSDemux *demux = (GstTSDemux *) base;
|
GstTSDemux *demux = (GstTSDemux *) base;
|
||||||
g_array_free (demux->index, TRUE);
|
if (demux->index) {
|
||||||
demux->index = NULL;
|
g_array_free (demux->index, TRUE);
|
||||||
|
demux->index = NULL;
|
||||||
|
}
|
||||||
demux->index_size = 0;
|
demux->index_size = 0;
|
||||||
demux->need_newsegment = TRUE;
|
demux->need_newsegment = TRUE;
|
||||||
demux->program_number = -1;
|
demux->program_number = -1;
|
||||||
|
@ -581,7 +583,7 @@ gst_ts_demux_perform_auxiliary_seek (MpegTSBase * base, GstClockTime seektime,
|
||||||
GstClockTime time = calculate_gsttime (pcroffset, pts * 300);
|
GstClockTime time = calculate_gsttime (pcroffset, pts * 300);
|
||||||
|
|
||||||
GST_DEBUG ("packet has PTS: %" GST_TIME_FORMAT,
|
GST_DEBUG ("packet has PTS: %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (time));
|
GST_TIME_ARGS (time));
|
||||||
|
|
||||||
if (time <= seektime) {
|
if (time <= seektime) {
|
||||||
pcroffset->gsttime = time;
|
pcroffset->gsttime = time;
|
||||||
|
|
Loading…
Reference in a new issue