mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
baseparse: need proper frame duration to obtain sensible frame bitrate
This commit is contained in:
parent
ebf124251f
commit
212eae966a
1 changed files with 4 additions and 1 deletions
|
@ -1206,7 +1206,10 @@ gst_base_parse_update_bitrates (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
gst_base_parse_post_bitrates (parse, FALSE, TRUE, FALSE);
|
gst_base_parse_post_bitrates (parse, FALSE, TRUE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (frame_dur)
|
||||||
frame_bitrate = (8 * data_len * GST_SECOND) / frame_dur;
|
frame_bitrate = (8 * data_len * GST_SECOND) / frame_dur;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
GST_LOG_OBJECT (parse, "frame bitrate %u, avg bitrate %u", frame_bitrate,
|
GST_LOG_OBJECT (parse, "frame bitrate %u, avg bitrate %u", frame_bitrate,
|
||||||
parse->priv->avg_bitrate);
|
parse->priv->avg_bitrate);
|
||||||
|
|
Loading…
Reference in a new issue