[FFmpeg-cvslog] lavr: check that current_buffer is not NULL before using it

Justin Ruggles git at videolan.org
Sun Jan 12 16:13:02 CET 2014


ffmpeg | branch: release/1.1 | Justin Ruggles <justin.ruggles at gmail.com> | Sun Oct 27 15:00:36 2013 -0400| [24a8dfd37b45d63e5f6332cfd12b58ad482f3df2] | committer: Reinhard Tartler

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 at libav.org
(cherry picked from commit 211ca69b13eb0a127a9ef7e70ddaccdab125d1c5)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24a8dfd37b45d63e5f6332cfd12b58ad482f3df2
---

 libavresample/utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavresample/utils.c b/libavresample/utils.c
index ed7f470..36d9d04 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);



More information about the ffmpeg-cvslog mailing list