mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
audioparse: fix possible division-by-zero
https://bugzilla.gnome.org/show_bug.cgi?id=635786
This commit is contained in:
parent
4230c0b2e1
commit
fc4885a3a3
1 changed files with 1 additions and 1 deletions
|
@ -1131,7 +1131,7 @@ gst_base_parse_update_bitrates (GstBaseParse * parse, GstBuffer * buffer)
|
|||
|
||||
/* duration should be valid by now,
|
||||
* either set by subclass or maybe based on fps settings */
|
||||
if (GST_BUFFER_DURATION_IS_VALID (buffer)) {
|
||||
if (GST_BUFFER_DURATION_IS_VALID (buffer) && parse->priv->acc_duration != 0) {
|
||||
/* Calculate duration of a frame from buffer properties */
|
||||
frame_dur = GST_BUFFER_DURATION (buffer);
|
||||
parse->priv->avg_bitrate = (8 * parse->priv->data_bytecount * GST_SECOND) /
|
||||
|
|
Loading…
Reference in a new issue