mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
baseparse: fix invalid avg_bitrate after reset
gst_base_parse_reset() does not reset data_bytecount to 0, so gst_base_parse_update_bitrates() uses a wrong value to calculate the average bitrate on subsequent pipeline starts. This leads to an excessive amount of "tag" events being pushed. These events include very high "bitrate" values that diminish over time, and are produced until the average bitrate is back to sane values. Fixes #840 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1285>
This commit is contained in:
parent
516f9592e7
commit
f263bdcb2b
1 changed files with 1 additions and 0 deletions
|
@ -826,6 +826,7 @@ gst_base_parse_reset (GstBaseParse * parse)
|
||||||
parse->priv->bitrate = 0;
|
parse->priv->bitrate = 0;
|
||||||
parse->priv->framecount = 0;
|
parse->priv->framecount = 0;
|
||||||
parse->priv->bytecount = 0;
|
parse->priv->bytecount = 0;
|
||||||
|
parse->priv->data_bytecount = 0;
|
||||||
parse->priv->acc_duration = 0;
|
parse->priv->acc_duration = 0;
|
||||||
parse->priv->first_frame_pts = GST_CLOCK_TIME_NONE;
|
parse->priv->first_frame_pts = GST_CLOCK_TIME_NONE;
|
||||||
parse->priv->first_frame_dts = GST_CLOCK_TIME_NONE;
|
parse->priv->first_frame_dts = GST_CLOCK_TIME_NONE;
|
||||||
|
|
Loading…
Reference in a new issue