Browse Source

avcodec/y41pdec: Avoid using float for size test

Floats are not bitexact

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
de0d3fe562
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/y41pdec.c

+ 1
- 1
libavcodec/y41pdec.c View File

@@ -43,7 +43,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, void *data,
uint8_t *y, *u, *v;
int i, j, ret;

if (avpkt->size < 1.5 * avctx->height * avctx->width) {
if (avpkt->size < 3LL * avctx->height * avctx->width / 2) {
av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n");
return AVERROR(EINVAL);
}


Loading…
Cancel
Save