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/afc.c | |
parent | e1836b191b8ce956bebf050e664975f2e0f92325 (diff) |
Avoid calling functions repeatedly via FFMIN
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/afc.c')
-rw-r--r-- | libavformat/afc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/afc.c b/libavformat/afc.c index a99f65472d..102b74baeb 100644 --- a/libavformat/afc.c +++ b/libavformat/afc.c @@ -57,10 +57,10 @@ static int afc_read_header(AVFormatContext *s) static int afc_read_packet(AVFormatContext *s, AVPacket *pkt) { AFCDemuxContext *c = s->priv_data; - int64_t size; + int64_t size = c->data_end - avio_tell(s->pb); int ret; - size = FFMIN(c->data_end - avio_tell(s->pb), 18 * 128); + size = FFMIN(size, 18 * 128); if (size <= 0) return AVERROR_EOF; |