mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
mpegtsdemux: check value before using as denominator
This commit is contained in:
parent
70be50fbed
commit
303a2eaec4
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue