diff --git a/gst/rtp/gstrtpmp4gdepay.c b/gst/rtp/gstrtpmp4gdepay.c index 887a91753a..939e3f1a8e 100644 --- a/gst/rtp/gstrtpmp4gdepay.c +++ b/gst/rtp/gstrtpmp4gdepay.c @@ -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;