diff mbox series

[FFmpeg-devel,07/15] avformat/avr: Combine skips

Message ID GV1P250MB073780B32CD412FC021C28848F302@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit cdff5a2c0cfa978b97398dd4e95cc2a292d05525
Headers show
Series [FFmpeg-devel,01/15] configure: Make hls demuxer select AAC, AC3 and EAC3 demuxers | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 23, 2024, 2:06 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/avr.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
diff mbox series

Patch

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) {