[FFmpeg-cvslog] dpcm: do not try to decode empty packets

Justin Ruggles git at videolan.org
Sat Nov 12 03:02:02 CET 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Nov  2 16:49:38 2011 -0400| [8dbc6d03c0ad5fc2f8067f7a43209e2fcbb204b0] | committer: Justin Ruggles

dpcm: do not try to decode empty packets

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8dbc6d03c0ad5fc2f8067f7a43209e2fcbb204b0
---

 libavcodec/dpcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index f6531db..abb2019 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -198,7 +198,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         break;
     }
     out *= av_get_bytes_per_sample(avctx->sample_fmt);
-    if (out < 0) {
+    if (out <= 0) {
         av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
         return AVERROR(EINVAL);
     }



More information about the ffmpeg-cvslog mailing list