summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-12-29 16:00:01 +0100
committerEdward Hervey <edward@collabora.com>2014-02-20 21:52:16 +0100
commitc229a87ac3e6bfb767004924b884f63625e4f368 (patch)
tree5d27e81e0c76f03ad9a025bafdbd50f3a63a3baa /gst/mpegtsdemux
parentcd3c3ebf0140a54625f95ae558686868edbe9a0a (diff)
mpegtspacketizer: Fix ts_to_offset beyond last observed PCR
The requested TS might be beyond the last observed PCR. In order to calculate a coherent offset, we need to use the last and previous-to-last groups. https://bugzilla.gnome.org/show_bug.cgi?id=721035
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/mpegtspacketizer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index ec7810f3f..c258bb9f9 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -2235,6 +2235,11 @@ mpegts_packetizer_ts_to_offset (MpegTSPacketizer2 * packetizer,
break;
}
+ if (tmp->next == NULL) {
+ GST_DEBUG ("pcr is beyond last group");
+ break;
+ }
+
prevgroup = nextgroup;
/* Maybe it's in this group */