diff options
author | Edward Hervey <edward@collabora.com> | 2013-12-29 16:00:01 +0100 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2014-02-20 21:52:16 +0100 |
commit | c229a87ac3e6bfb767004924b884f63625e4f368 (patch) | |
tree | 5d27e81e0c76f03ad9a025bafdbd50f3a63a3baa /gst/mpegtsdemux | |
parent | cd3c3ebf0140a54625f95ae558686868edbe9a0a (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.c | 5 |
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 */ |