baseparse: fix taglist update spam
authorTim-Philipp Müller <tim@centricular.com>
Thu, 24 Aug 2017 15:00:42 +0000 (16:00 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 25 Aug 2017 16:36:33 +0000 (17:36 +0100)
commit39e21bb6dd79e467ff747ab93b19078f03d03646
tree86952457c612d8e19cbad5bf06181dbd587ac2b9
parent85e9f41439a8353e8dd00e70c346d5845933ff12
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
libs/gst/base/gstbaseparse.c