mpegtsdemux: check value before using as denominator

This commit is contained in:
David Schleef 2013-04-15 16:01:29 -07:00
parent 70be50fbed
commit 303a2eaec4

View file

@ -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,