mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
flacdec: skip all track indices at once instead of looping.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
This commit is contained in:
parent
c15da5941d
commit
17c84f4ed2
@ -102,7 +102,7 @@ static int flac_read_header(AVFormatContext *s,
|
|||||||
uint8_t isrc[13];
|
uint8_t isrc[13];
|
||||||
uint64_t start;
|
uint64_t start;
|
||||||
const uint8_t *offset;
|
const uint8_t *offset;
|
||||||
int i, j, chapters, track, ti;
|
int i, chapters, track, ti;
|
||||||
if (metadata_size < 431)
|
if (metadata_size < 431)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
offset = buffer + 395;
|
offset = buffer + 395;
|
||||||
@ -119,8 +119,7 @@ static int flac_read_header(AVFormatContext *s,
|
|||||||
offset += 14;
|
offset += 14;
|
||||||
ti = bytestream_get_byte(&offset);
|
ti = bytestream_get_byte(&offset);
|
||||||
if (ti <= 0) return AVERROR_INVALIDDATA;
|
if (ti <= 0) return AVERROR_INVALIDDATA;
|
||||||
for (j = 0; j < ti; j++)
|
offset += ti * 12;
|
||||||
offset += 12;
|
|
||||||
avpriv_new_chapter(s, track, st->time_base, start, AV_NOPTS_VALUE, isrc);
|
avpriv_new_chapter(s, track, st->time_base, start, AV_NOPTS_VALUE, isrc);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user