0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00
mpv/audio
Peter DeLong f46bbde5e6 af_scaletempo2: fix crash when the number of channels increases
When af_scaletempo2.c:process() detects a format change, it goes back
through mp_scaletempo2_init() to reinitialize everything.  However,
mp_scaletempo2.input_buffer is not necessarily reallocated due to a
check in af_scaletempo2_internals.c:resize_input_buffer().  This is a
problem if the number of audio channels increases, since without
reallocating, the buffer for the new channel(s) will at best point to
NULL, and at worst uninitialized memory.

Since resize_input_buffer() is only called from two places, pull size
check out into mp_scaletempo2_fill_input_buffer().  This allows each
caller to decide whether they want to resize or not.  We could be
smarter about when to reallocate, but that would add a lot of machinery
for a case I don't expect to be hit often in practice.
2022-09-23 18:15:00 +02:00
..
decode ad_lavc: strip non-normalized floats 2022-09-02 01:27:31 +02:00
filter af_scaletempo2: fix crash when the number of channels increases 2022-09-23 18:15:00 +02:00
out ao_audiounit: get the channel layout from the AU itself 2022-09-15 11:52:50 -05:00
aframe.c ad_lavc: strip non-normalized floats 2022-09-02 01:27:31 +02:00
aframe.h ad_lavc: strip non-normalized floats 2022-09-02 01:27:31 +02:00
chmap_avchannel.c audio: add AVChannelLayout helpers to convert from/to mp_chmap 2022-06-12 21:05:59 +03:00
chmap_avchannel.h audio: add AVChannelLayout helpers to convert from/to mp_chmap 2022-06-12 21:05:59 +03:00
chmap_sel.c audio: use --audio-channels=auto behavior, except on ALSA 2016-08-04 20:49:20 +02:00
chmap_sel.h audio: use --audio-channels=auto behavior, except on ALSA 2016-08-04 20:49:20 +02:00
chmap.c audio/chmap: add mp_iterate_builtin_layouts 2022-06-15 21:19:10 +03:00
chmap.h audio/chmap: add mp_iterate_builtin_layouts 2022-06-15 21:19:10 +03:00
fmt-conversion.c audio: add support for AV_SAMPLE_FMT_S64* 2019-09-27 21:21:34 +02:00
fmt-conversion.h audio/fmt-conversion: change license to LGPL 2017-05-05 07:25:55 +02:00
format.c audio: fix copy&paste error 2019-09-27 21:31:04 +02:00
format.h audio: add support for AV_SAMPLE_FMT_S64* 2019-09-27 21:21:34 +02:00