diff options
author | wm4 <wm4@nowhere> | 2016-08-16 00:03:02 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-08-16 00:05:34 +0200 |
commit | 814dacdd7d010407a4bea74b3a047079f49c5c39 (patch) | |
tree | 28021b02458c7e7b177759e7fb0bb002bbf755d5 /.github | |
parent | 86fa1e6129b89a59492d7eb4b84e52dbec3d49ad (diff) | |
download | mpv-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 '.github')
0 files changed, 0 insertions, 0 deletions