mimic: do not continue if swap_buf_size is 0

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
pull/3/merge
Paul B Mahol 13 years ago committed by Ronald S. Bultje
parent dba425ad7a
commit 33c5c3ad07
  1. 2
      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;
}

Loading…
Cancel
Save