aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-15 22:58:46 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-26 06:36:43 +0100
commitcdff5a2c0cfa978b97398dd4e95cc2a292d05525 (patch)
treeb4d25f079a8b9630fca0c2178e839d29946321aa
parent56ba83ff2d7225189cee296b6a5c33ba6619e521 (diff)
downloadffmpeg-cdff5a2c0cfa978b97398dd4e95cc2a292d05525.tar.gz
avformat/avr: Combine skips
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavformat/avr.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libavformat/avr.c b/libavformat/avr.c
index 12286c04d4..261edef4b5 100644
--- a/libavformat/avr.c
+++ b/libavformat/avr.c
@@ -49,8 +49,7 @@ static int avr_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
- avio_skip(s->pb, 4); // magic
- avio_skip(s->pb, 8); // sample_name
+ avio_skip(s->pb, 4 /* magic */ + 8 /* sample_name */);
chan = avio_rb16(s->pb);
if (!chan) {
@@ -66,18 +65,13 @@ static int avr_read_header(AVFormatContext *s)
sign = avio_rb16(s->pb);
- avio_skip(s->pb, 2); // loop
- avio_skip(s->pb, 2); // midi
- avio_skip(s->pb, 1); // replay speed
+ avio_skip(s->pb, 2 /* loop */ + 2 /* midi */ + 1 /* replay speed */);
st->codecpar->sample_rate = avio_rb24(s->pb);
if (st->codecpar->sample_rate == 0)
return AVERROR_INVALIDDATA;
- avio_skip(s->pb, 4 * 3);
- avio_skip(s->pb, 2 * 3);
- avio_skip(s->pb, 20);
- avio_skip(s->pb, 64);
+ avio_skip(s->pb, 4 * 3 + 2 * 3 + 20 + 64);
st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign);
if (st->codecpar->codec_id == AV_CODEC_ID_NONE) {