summaryrefslogtreecommitdiff
path: root/libavcodec/dpcm.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-01-31 17:30:28 +0000
committerMike Melanson <mike@multimedia.cx>2004-01-31 17:30:28 +0000
commitc89c1d2542401b40c6ede6ed3ff4f323c3a85de8 (patch)
tree26df09568593e0e3a8f7d8f7de1c9529660c730a /libavcodec/dpcm.c
parent2c8b796fa9000bf7c5946771701a41ea2f0ae3d9 (diff)
handle 0-length buffers
Originally committed as revision 2731 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dpcm.c')
-rw-r--r--libavcodec/dpcm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index ef4ccf8860..b59a9cd6b8 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -125,6 +125,9 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
unsigned char byte;
short diff;
+ if (!buf_size)
+ return 0;
+
switch(avctx->codec->id) {
case CODEC_ID_ROQ_DPCM: