From df72754d03b164fa2ee2baafed248cffafcda5cc Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Sat, 31 Jan 2004 17:40:28 +0000 Subject: [PATCH] handle 0-length buffers Originally committed as revision 2732 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/adpcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index c3ae66effc..bced66f198 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -444,6 +444,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, int decode_top_nibble_next = 0; int diff_channel; + if (!buf_size) + return 0; + samples = data; src = buf;