diff options
author | Pascal Hache <hacpa@touchtunes.com> | 2021-10-22 18:00:06 +0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-10-31 16:10:07 +0300 |
commit | f263bdcb2b4dbb5a5d7453645e0f58ef23c451e1 (patch) | |
tree | 7f1b5056ee7014e9ea686d2f8015843278e8b184 | |
parent | 516f9592e7249fd6139e6493596d438f5b2b7ba5 (diff) |
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>
-rw-r--r-- | libs/gst/base/gstbaseparse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 761dd8aac6..cd7b3cf61a 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -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; |