mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
rtpmp4gdepay: avoid division by 0
Avoid a division by 0 when no constantDuration was specified and when out two timestamps are equal. Fixes #610265
This commit is contained in:
parent
e43839eae9
commit
3a09d334a0
1 changed files with 6 additions and 2 deletions
|
@ -546,8 +546,12 @@ gst_rtp_mp4g_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
rtpmp4gdepay->constantDuration);
|
||||
}
|
||||
|
||||
/* get the number of packets by dividing with the duration */
|
||||
diff /= rtpmp4gdepay->constantDuration;
|
||||
if (rtpmp4gdepay->constantDuration > 0) {
|
||||
/* get the number of packets by dividing with the duration */
|
||||
diff /= rtpmp4gdepay->constantDuration;
|
||||
} else {
|
||||
diff = 0;
|
||||
}
|
||||
|
||||
rtpmp4gdepay->last_AU_index += diff;
|
||||
rtpmp4gdepay->prev_AU_index = AU_index;
|
||||
|
|
Loading…
Reference in a new issue