summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-06-17 16:12:00 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-06-17 16:18:03 -0300
commitca8ea19cc37bd7e87240762c4a34da246e5a20d9 (patch)
tree8b5711c4a9993115eacdd5f578994ad3f587f1b8 /gst/mpegtsdemux
parentd04efbd735533fe543e299db1cc730ed799c31eb (diff)
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
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/tsdemux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index b602ab7c1..9894d8df8 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -305,8 +305,10 @@ static void
gst_ts_demux_reset (MpegTSBase * base)
{
GstTSDemux *demux = (GstTSDemux *) base;
- g_array_free (demux->index, TRUE);
- demux->index = NULL;
+ if (demux->index) {
+ g_array_free (demux->index, TRUE);
+ demux->index = NULL;
+ }
demux->index_size = 0;
demux->need_newsegment = TRUE;
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);
GST_DEBUG ("packet has PTS: %" GST_TIME_FORMAT,
- GST_TIME_ARGS (time));
+ GST_TIME_ARGS (time));
if (time <= seektime) {
pcroffset->gsttime = time;