aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2013-10-27 15:00:36 -0400
committerReinhard Tartler <siretart@tauware.de>2014-01-05 17:07:46 -0500
commit24a8dfd37b45d63e5f6332cfd12b58ad482f3df2 (patch)
treeb556ef2a95d4fd7b041d33b59fb4bc926fba9495
parenta8f6d93071a8ac1f039a4ee2ae1f74dcd77da1cb (diff)
downloadffmpeg-24a8dfd37b45d63e5f6332cfd12b58ad482f3df2.tar.gz
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 211ca69b13eb0a127a9ef7e70ddaccdab125d1c5) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavresample/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavresample/utils.c b/libavresample/utils.c
index ed7f470483..36d9d04430 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -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);