From c89c1d2542401b40c6ede6ed3ff4f323c3a85de8 Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Sat, 31 Jan 2004 17:30:28 +0000 Subject: [PATCH] handle 0-length buffers Originally committed as revision 2731 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dpcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c index ef4ccf8..b59a9cd 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: -- 2.7.4