aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-23 21:27:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-23 21:46:07 +0200
commitde0d3fe562e25560d0fe4e2b6902e5878a2a63cc (patch)
tree4528be863384ba529b0d604bb2cbfda33c986ab5 /libavcodec
parent8952254ffe7f43a967a3be5fdd40e48d899c2e01 (diff)
downloadffmpeg-de0d3fe562e25560d0fe4e2b6902e5878a2a63cc.tar.gz
avcodec/y41pdec: Avoid using float for size test
Floats are not bitexact Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/y41pdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/y41pdec.c b/libavcodec/y41pdec.c
index 9d1e5313e3..22c7d1fd38 100644
--- a/libavcodec/y41pdec.c
+++ b/libavcodec/y41pdec.c
@@ -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);
}