From d2c702af7722ea3c3f69664121fad2fc9862cb15 Mon Sep 17 00:00:00 2001 From: David McPaul Date: Sat, 1 Nov 2008 22:59:52 +0000 Subject: [PATCH] Log an error before returning error result git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28450 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/plugins/avcodec/libavcodec/adpcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/add-ons/media/plugins/avcodec/libavcodec/adpcm.c b/src/add-ons/media/plugins/avcodec/libavcodec/adpcm.c index c4fb3eeb6d..39fe04a1bf 100644 --- a/src/add-ons/media/plugins/avcodec/libavcodec/adpcm.c +++ b/src/add-ons/media/plugins/avcodec/libavcodec/adpcm.c @@ -915,8 +915,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx, //should protect all 4bit ADPCM variants //8 is needed for CODEC_ID_ADPCM_IMA_WAV with 2 channels // - if(*data_size/4 < buf_size + 8) + if(*data_size/4 < buf_size + 8) { + av_log(avctx, AV_LOG_ERROR, "ERROR: Data size too small\n"); return -1; + } samples = data; samples_end= samples + *data_size/2;