summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-16 00:03:02 +0200
committerwm4 <wm4@nowhere>2016-08-16 00:05:34 +0200
commit814dacdd7d010407a4bea74b3a047079f49c5c39 (patch)
tree28021b02458c7e7b177759e7fb0bb002bbf755d5 /demux/demux.c
parent86fa1e6129b89a59492d7eb4b84e52dbec3d49ad (diff)
downloadmpv-814dacdd7d010407a4bea74b3a047079f49c5c39.tar.bz2
mpv-814dacdd7d010407a4bea74b3a047079f49c5c39.tar.xz
af_lavrresample: work around libswresample misbehavior
The touched code is for seek resets and such - we simply want to reset the entire resample state. But I noticed after a seek a tiny bit of audio is missing (mpv's audio sync code inserted silence to compensate). It turns out swr_drop_output() either does not reset some internal state as we expect, or it's designed to drop not only buffered samples, but also future samples. On the other hand, libavresample's avresample_read(), does not have this problem. (It is also pretty explicit in what it does - return/skip buffered data, nothing else.) Is the libswresample behavior a bug? Or a feature? Does nobody even know? Who cares - use the hammer to unfuck the situation. Destroy and deallocate the libswresample context and recreate it. On every seek.
Diffstat (limited to 'demux/demux.c')
0 files changed, 0 insertions, 0 deletions