mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '470c9db11ff2c3249e995e7ba68e87bb81bf778c'
* commit '470c9db11ff2c3249e995e7ba68e87bb81bf778c': sidxindex: Remove parsing that isn't necessary any longer Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
38c1bffd80
@ -43,8 +43,6 @@ struct Track {
|
|||||||
int timescale;
|
int timescale;
|
||||||
char codec_str[30];
|
char codec_str[30];
|
||||||
int64_t sidx_start, sidx_length;
|
int64_t sidx_start, sidx_length;
|
||||||
int64_t earliest_presentation;
|
|
||||||
uint32_t earliest_presentation_timescale;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Tracks {
|
struct Tracks {
|
||||||
@ -95,14 +93,6 @@ static int find_sidx(struct Tracks *tracks, int start_index,
|
|||||||
if (size < 8)
|
if (size < 8)
|
||||||
break;
|
break;
|
||||||
if (tag == MKBETAG('s', 'i', 'd', 'x')) {
|
if (tag == MKBETAG('s', 'i', 'd', 'x')) {
|
||||||
int version, track_id;
|
|
||||||
uint32_t timescale;
|
|
||||||
int64_t earliest_presentation;
|
|
||||||
version = avio_r8(f);
|
|
||||||
avio_rb24(f); /* flags */
|
|
||||||
track_id = avio_rb32(f);
|
|
||||||
timescale = avio_rb32(f);
|
|
||||||
earliest_presentation = version ? avio_rb64(f) : avio_rb32(f);
|
|
||||||
for (i = start_index; i < tracks->nb_tracks; i++) {
|
for (i = start_index; i < tracks->nb_tracks; i++) {
|
||||||
struct Track *track = tracks->tracks[i];
|
struct Track *track = tracks->tracks[i];
|
||||||
if (!track->sidx_start) {
|
if (!track->sidx_start) {
|
||||||
@ -111,10 +101,6 @@ static int find_sidx(struct Tracks *tracks, int start_index,
|
|||||||
} else if (pos == track->sidx_start + track->sidx_length) {
|
} else if (pos == track->sidx_start + track->sidx_length) {
|
||||||
track->sidx_length = pos + size - track->sidx_start;
|
track->sidx_length = pos + size - track->sidx_start;
|
||||||
}
|
}
|
||||||
if (track->track_id == track_id) {
|
|
||||||
track->earliest_presentation = earliest_presentation;
|
|
||||||
track->earliest_presentation_timescale = timescale;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (avio_seek(f, pos + size, SEEK_SET) != pos + size)
|
if (avio_seek(f, pos + size, SEEK_SET) != pos + size)
|
||||||
|
Loading…
Reference in New Issue
Block a user