History

avformat/avr: Combine skips

Andreas Rheinhardt committed 2 years ago

Commit cdff5a21 parent 56ba83f1 file · +3 −9Browse files

Unified · Split

libavformat/avr.c+3−9
@@ -49,8 +49,7 @@ static int avr_read_header(AVFormatContext *s) · 48 unmodified lines
4949
5050 st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
5151
52− avio_skip(s->pb, 4); // magic
53− avio_skip(s->pb, 8); // sample_name
52+ avio_skip(s->pb, 4 /* magic */ + 8 /* sample_name */);
5453
5554 chan = avio_rb16(s->pb);
5655 if (!chan) {
@@ -66,18 +65,13 @@ static int avr_read_header(AVFormatContext *s) · 9 unmodified lines
6665
6766 sign = avio_rb16(s->pb);
6867
69− avio_skip(s->pb, 2); // loop
70− avio_skip(s->pb, 2); // midi
71− avio_skip(s->pb, 1); // replay speed
68+ avio_skip(s->pb, 2 /* loop */ + 2 /* midi */ + 1 /* replay speed */);
7269
7370 st->codecpar->sample_rate = avio_rb24(s->pb);
7471 if (st->codecpar->sample_rate == 0)
7572 return AVERROR_INVALIDDATA;
7673
77− avio_skip(s->pb, 4 * 3);
78− avio_skip(s->pb, 2 * 3);
79− avio_skip(s->pb, 20);
80− avio_skip(s->pb, 64);
74+ avio_skip(s->pb, 4 * 3 + 2 * 3 + 20 + 64);
8175
8276 st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign);
8377 if (st->codecpar->codec_id == AV_CODEC_ID_NONE) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t