1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 05:15:12 +00:00
mpv/audio
wm4 1151dac5f0 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.
2013-11-18 14:21:00 +01:00
..
decode audio: use the decoder buffer's format, not sh_audio 2013-11-18 14:21:00 +01:00
filter audio: fix mid-stream audio reconfiguration 2013-11-18 14:20:59 +01:00
out ao_null: properly simulate final chunk, add buffer options 2013-11-17 16:22:25 +01:00
audio_buffer.c audio: add mp_audio_buffer 2013-11-12 23:28:21 +01:00
audio_buffer.h audio: add mp_audio_buffer 2013-11-12 23:28:21 +01:00
audio.c audio: fix audio data memory leak 2013-11-14 19:51:42 +01:00
audio.h mp_audio: use av_malloc (cargo cult for libav*) 2013-11-12 23:35:33 +01:00
chmap_sel.c ao_jack: allow more control about channel layouts 2013-07-07 18:37:55 +02:00
chmap_sel.h audio: add channel map selection function 2013-05-12 21:24:57 +02:00
chmap.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
chmap.h core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
fmt-conversion.c audio: drop "_NE"/"ne" suffix from audio formats 2013-11-15 21:25:05 +01:00
fmt-conversion.h ad_lavc: use fmt-conversion to map sample formats 2013-04-13 04:21:27 +02:00
format.c audio/format: add heuristic to estimate loss on format conversion 2013-11-16 21:46:17 +01:00
format.h audio/format: add heuristic to estimate loss on format conversion 2013-11-16 21:46:17 +01:00
mixer.c af_volume: use only one volume setting for all channels 2013-11-09 23:32:58 +01:00
mixer.h command: don't allow changing volume if no audio initialized 2013-10-12 18:57:02 +02:00
reorder_ch.c ao_lavc: support non-interleaved audio 2013-11-13 20:10:17 +01:00
reorder_ch.h ao_lavc: support non-interleaved audio 2013-11-13 20:10:17 +01:00