lavr: check that current_buffer is not NULL before using it
Fixes a segfault during resampling when compiled with -DDEBUG.
Fixes all fate-lavr-resample tests with -DDEBUG.
CC:libav-stable@libav.org
(cherry picked from commit 211ca69b13
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
a8f6d93071
commit
24a8dfd37b
@@ -350,7 +350,8 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr,
|
||||
resample_out = &output_buffer;
|
||||
else
|
||||
resample_out = avr->resample_out_buffer;
|
||||
av_dlog(avr, "[resample] %s to %s\n", current_buffer->name,
|
||||
av_dlog(avr, "[resample] %s to %s\n",
|
||||
current_buffer ? current_buffer->name : "null",
|
||||
resample_out->name);
|
||||
ret = ff_audio_resample(avr->resample, resample_out,
|
||||
current_buffer);
|
||||
|
Reference in New Issue
Block a user