diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-06-13 01:55:40 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-18 22:06:20 +0200 |
commit | f9136d6026ede3a98f3bffc23e1deacca37cbf3b (patch) | |
tree | 0eaf835427ddf1dda625597646a6e085d85c294c /libavformat/avidec.c | |
parent | e1836b191b8ce956bebf050e664975f2e0f92325 (diff) |
Avoid calling functions repeatedly via FFMIN
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 39039f5bc9..2e261c94e6 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -362,7 +362,8 @@ static void avi_read_nikon(AVFormatContext *s, uint64_t end) uint16_t size = avio_rl16(s->pb); const char *name = NULL; char buffer[64] = { 0 }; - size = FFMIN(size, tag_end - avio_tell(s->pb)); + uint64_t remaining = tag_end - avio_tell(s->pb); + size = FFMIN(size, remaining); size -= avio_read(s->pb, buffer, FFMIN(size, sizeof(buffer) - 1)); switch (tag) { |