projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70be50f
)
mpegtsdemux: check value before using as denominator
author
David Schleef
<ds@schleef.org>
Mon, 15 Apr 2013 23:01:29 +0000
(16:01 -0700)
committer
David Schleef
<ds@schleef.org>
Tue, 16 Apr 2013 00:05:30 +0000
(17:05 -0700)
gst/mpegtsdemux/mpegtspacketizer.c
patch
|
blob
|
history
diff --git
a/gst/mpegtsdemux/mpegtspacketizer.c
b/gst/mpegtsdemux/mpegtspacketizer.c
index
7e7aa9e
..
b0eee85
100644
(file)
--- a/
gst/mpegtsdemux/mpegtspacketizer.c
+++ b/
gst/mpegtsdemux/mpegtspacketizer.c
@@
-3658,6
+3658,9
@@
mpegts_packetizer_offset_to_ts (MpegTSPacketizer2 * packetizer, guint64 offset,
pcrtable = get_pcr_table (packetizer, pid);
+ if (G_UNLIKELY (pcrtable->last_offset <= pcrtable->first_offset))
+ return GST_CLOCK_TIME_NONE;
+
/* Convert byte difference into time difference */
res = PCRTIME_TO_GSTTIME (gst_util_uint64_scale (offset - priv->refoffset,
pcrtable->last_pcr - pcrtable->first_pcr,