Commit f263bdcb authored by hacpa's avatar hacpa Committed by GStreamer Marge Bot
Browse files

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: <gstreamer/gstreamer!1285>
parent 516f9592
......@@ -826,6 +826,7 @@ gst_base_parse_reset (GstBaseParse * parse)
parse->priv->bitrate = 0;
parse->priv->framecount = 0;
parse->priv->bytecount = 0;
parse->priv->data_bytecount = 0;
parse->priv->acc_duration = 0;
parse->priv->first_frame_pts = GST_CLOCK_TIME_NONE;
parse->priv->first_frame_dts = GST_CLOCK_TIME_NONE;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment