[FFmpeg-cvslog] mimic: do not continue if swap_buf_size is 0

Paul B Mahol git at videolan.org
Tue Mar 13 02:22:17 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Mar 12 14:56:41 2012 +0000| [33c5c3ad070bc1203e48c8af9c6272d71f1d8b4d] | committer: Ronald S. Bultje

mimic: do not continue if swap_buf_size is 0

Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

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

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

diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 0a6ac26..aa14f64 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -312,7 +312,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
     int quality, num_coeffs;
     int swap_buf_size = buf_size - MIMIC_HEADER_SIZE;
 
-    if(buf_size < MIMIC_HEADER_SIZE) {
+    if (buf_size <= MIMIC_HEADER_SIZE) {
         av_log(avctx, AV_LOG_ERROR, "insufficient data\n");
         return -1;
     }



More information about the ffmpeg-cvslog mailing list