mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-22 15:23:42 +00:00
Merge commit '8835c554ff506992c47f6e347c74216ae073f0fa'
* commit '8835c554ff506992c47f6e347c74216ae073f0fa': matroskadec: introduce resync function. Conflicts: libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
045e371cf1
@ -628,21 +628,20 @@ static int matroska_resync(MatroskaDemuxContext *matroska, int64_t last_pos)
|
|||||||
matroska->current_id = 0;
|
matroska->current_id = 0;
|
||||||
matroska->num_levels = 0;
|
matroska->num_levels = 0;
|
||||||
|
|
||||||
// seek to next position to resync from
|
/* seek to next position to resync from */
|
||||||
if (avio_seek(pb, last_pos + 1, SEEK_SET) < 0 || avio_tell(pb) <= last_pos)
|
if (avio_seek(pb, last_pos + 1, SEEK_SET) < 0)
|
||||||
goto eof;
|
goto eof;
|
||||||
|
|
||||||
id = avio_rb32(pb);
|
id = avio_rb32(pb);
|
||||||
|
|
||||||
// try to find a toplevel element
|
// try to find a toplevel element
|
||||||
while (!url_feof(pb)) {
|
while (!url_feof(pb)) {
|
||||||
if (id == MATROSKA_ID_INFO || id == MATROSKA_ID_TRACKS ||
|
if (id == MATROSKA_ID_INFO || id == MATROSKA_ID_TRACKS ||
|
||||||
id == MATROSKA_ID_CUES || id == MATROSKA_ID_TAGS ||
|
id == MATROSKA_ID_CUES || id == MATROSKA_ID_TAGS ||
|
||||||
id == MATROSKA_ID_SEEKHEAD || id == MATROSKA_ID_ATTACHMENTS ||
|
id == MATROSKA_ID_SEEKHEAD || id == MATROSKA_ID_ATTACHMENTS ||
|
||||||
id == MATROSKA_ID_CLUSTER || id == MATROSKA_ID_CHAPTERS)
|
id == MATROSKA_ID_CLUSTER || id == MATROSKA_ID_CHAPTERS) {
|
||||||
{
|
matroska->current_id = id;
|
||||||
matroska->current_id = id;
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
id = (id << 8) | avio_r8(pb);
|
id = (id << 8) | avio_r8(pb);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user