summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-18 13:57:17 +0100
committerwm4 <wm4@nowhere>2013-11-18 14:21:00 +0100
commit1151dac5f0e0fda012ce228f5a358c72b26fffe3 (patch)
treea24a6d66c7129d33c40f490f7f20b4811d34478a /stream
parent8f1151a00edf3aac78baa6779284eede3e9ee872 (diff)
downloadmpv-1151dac5f0e0fda012ce228f5a358c72b26fffe3.tar.bz2
mpv-1151dac5f0e0fda012ce228f5a358c72b26fffe3.tar.xz
audio: use the decoder buffer's format, not sh_audio
When the decoder detects a format change, it overwrites the values stored in sh_audio (this affects the members sample_format, samplerate, channels). In the case when the old audio data still needs to be played/filtered, the audio format as identified by sh_audio and the format used for the decoder buffer can mismatch. In particular, they will mismatch in the very unlikely but possible case the audio chain is reinitialized while old data is draining during a format change. Or in other words, sh_audio might contain the new format, while the audio chain is still configured to use the old format. Currently, the audio code (player/audio.c and init_audio_filters) access sh_audio to get the current format. This is in theory incorrect for the reasons mentioned above. Use the decoder buffer's format instead, which should be correct at any point.
Diffstat (limited to 'stream')
0 files changed, 0 insertions, 0 deletions