[FFmpeg-cvslog] avcodec/ffv1dec: replace literal 65535 by what it is
Michael Niedermayer
git at videolan.org
Tue Mar 25 12:50:41 EET 2025
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Mar 24 16:02:16 2025 +0100| [522fc389e854f27e99e364eadd22c8d6d414b875] | committer: Michael Niedermayer
avcodec/ffv1dec: replace literal 65535 by what it is
should make the code easier to understand
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=522fc389e854f27e99e364eadd22c8d6d414b875
---
libavcodec/ffv1dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 21a7642a08..25b5586410 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list