videorate: fix dynamically changing average period
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Thu, 25 Aug 2011 14:14:58 +0000 (15:14 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Wed, 31 Aug 2011 13:13:56 +0000 (14:13 +0100)
commit08ac05a06c30cc8a5608d85130209db5c731d3eb
treec7d241f9d21981828f77ccd7a41e89dcbcf7229a
parentea46b3c706ea99257d2b31cb5c7fb281f43b3178
videorate: fix dynamically changing average period

The average_period_set variable can be accessed in different threads, so
always lock it when reading. Furthermore when switching to averaging
mode we should make sure we don't have cached buffers that aren't used
in that mode. And any modeswitch will cause the latency to change, so we
should post a NewLatency message
gst/videorate/gstvideorate.c