summaryrefslogtreecommitdiff
path: root/libavcodec/dpcm.c
diff options
context:
space:
mode:
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: