From: Mike Melanson Date: Sat, 31 Jan 2004 17:40:28 +0000 (+0000) Subject: handle 0-length buffers X-Git-Tag: v0.5~15471 X-Git-Url: https://git.libav.org/?p=libav.git;a=commitdiff_plain;h=df72754d03b164fa2ee2baafed248cffafcda5cc handle 0-length buffers Originally committed as revision 2732 to svn://svn.ffmpeg.org/ffmpeg/trunk --- 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;