Avoid a division by 0 when no constantDuration was specified and when out two
timestamps are equal.
Fixes #610265
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;