[FFmpeg-cvslog] avformat/avr: Combine skips
Andreas Rheinhardt
git at videolan.org
Tue Mar 26 07:44:24 EET 2024
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Mar 15 22:58:46 2024 +0100| [cdff5a2c0cfa978b97398dd4e95cc2a292d05525] | committer: Andreas Rheinhardt
avformat/avr: Combine skips
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cdff5a2c0cfa978b97398dd4e95cc2a292d05525
---
libavformat/avr.c | 12 +++---------
1 file 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) {
More information about the ffmpeg-cvslog
mailing list