mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
baseparse: fix taglist update spam
We would constantly re-post the taglist because posted_avg_rate only gets set to avg_bitrate if parse->priv->post_avg_bitrate is true, so if it's false the posted rate will always differ from the current average rate and we'd queue an update, which leads to us spamming downstream and the application with taglist updates. Fix this by only queuing an update if the average rate will actually be posted. These taglists updates could cause expensive operations on the application side, e.g. in Totem. https://bugzilla.gnome.org/show_bug.cgi?id=786561
This commit is contained in:
parent
85e9f41439
commit
39e21bb6dd
1 changed files with 2 additions and 1 deletions
|
@ -1823,7 +1823,8 @@ gst_base_parse_update_bitrates (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
if (parse->priv->bitrate) {
|
if (parse->priv->bitrate) {
|
||||||
parse->priv->avg_bitrate = parse->priv->bitrate;
|
parse->priv->avg_bitrate = parse->priv->bitrate;
|
||||||
/* spread this (confirmed) info ASAP */
|
/* spread this (confirmed) info ASAP */
|
||||||
if (parse->priv->posted_avg_bitrate != parse->priv->avg_bitrate)
|
if (parse->priv->post_avg_bitrate &&
|
||||||
|
parse->priv->posted_avg_bitrate != parse->priv->avg_bitrate)
|
||||||
parse->priv->tags_changed = TRUE;
|
parse->priv->tags_changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue