audiorate: Update next_offset per rate change
authorSeungha Yang <seungha.yang@navercorp.com>
Thu, 7 Nov 2019 13:00:03 +0000 (22:00 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 18 Nov 2019 12:02:18 +0000 (12:02 +0000)
commit3997224eb440c60d41852bb5cfe6e7ab879992df
tree43534cb5d65d1147c5f51f2f0aba47f186728f8b
parent492415abcc743a6b44560a5d3445a23e119d9b12
audiorate: Update next_offset per rate change

To support runtime audio samplerate change, re-calculate next target offset
per caps. Calculating the next buffer offset using the previous
offset seems to be tricky and rounding error prone.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/693
gst/audiorate/gstaudiorate.c