aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-01-31 17:40:28 +0000
committerMike Melanson <mike@multimedia.cx>2004-01-31 17:40:28 +0000
commitdf72754d03b164fa2ee2baafed248cffafcda5cc (patch)
tree0ce4920957299981cafd928b739d988581e92668 /libavcodec/adpcm.c
parentc89c1d2542401b40c6ede6ed3ff4f323c3a85de8 (diff)
downloadffmpeg-df72754d03b164fa2ee2baafed248cffafcda5cc.tar.gz
handle 0-length buffers
Originally committed as revision 2732 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c3
1 files changed, 3 insertions, 0 deletions
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;