handle 0-length buffers
authorMike Melanson <mike@multimedia.cx>
Sat, 31 Jan 2004 17:30:28 +0000 (17:30 +0000)
committerMike Melanson <mike@multimedia.cx>
Sat, 31 Jan 2004 17:30:28 +0000 (17:30 +0000)
Originally committed as revision 2731 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/dpcm.c

index ef4ccf8..b59a9cd 100644 (file)
@@ -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: