1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/ffv1dec: replace literal 65535 by what it is

should make the code easier to understand

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2025-03-24 16:02:16 +01:00
parent 5ca14b23f1
commit 522fc389e8

View File

@ -326,7 +326,7 @@ static int decode_remap(FFV1Context *f, FFV1SliceContext *sc)
}
if (i == end)
break;
if (i - 1 > end || j > 65535)
if (i - 1 > end || j >= FF_ARRAY_ELEMS(sc->fltmap[p]))
return AVERROR_INVALIDDATA;
if (end <= 0xFFFF) {
sc->fltmap [p][j++] = i ^ ((i& 0x8000) ? 0 : flip);