changeset 1767:19ee8ddea820 libavcodec

handle 0-length buffers
author melanson
date Sat, 31 Jan 2004 17:30:28 +0000
parents 95c7b69f37f3
children 45e99aa10395
files dpcm.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dpcm.c	Thu Jan 29 15:50:54 2004 +0000
+++ b/dpcm.c	Sat Jan 31 17:30:28 2004 +0000
@@ -125,6 +125,9 @@
     unsigned char byte;
     short diff;
 
+    if (!buf_size)
+        return 0;
+
     switch(avctx->codec->id) {
 
     case CODEC_ID_ROQ_DPCM: