зеркало из https://github.com/mozilla/gecko-dev.git
Bug 834496 - Use ne_map_track_number_to_index in nestegg_track_seek r=kinetik
This commit is contained in:
Родитель
757574a538
Коммит
72e433782c
|
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
||||||
|
|
||||||
The nestegg git repository is: git://github.com/kinetiknz/nestegg.git
|
The nestegg git repository is: git://github.com/kinetiknz/nestegg.git
|
||||||
|
|
||||||
The git commit ID used was 1b1ecd43d1416aec159e1dd41331289aa144bbc4.
|
The git commit ID used was 231bff74be5ccfb3caf111266449e6a431712675.
|
||||||
|
|
|
@ -1727,7 +1727,8 @@ nestegg_track_seek(nestegg * ctx, unsigned int track, uint64_t tstamp)
|
||||||
int r;
|
int r;
|
||||||
struct cue_point * cue_point;
|
struct cue_point * cue_point;
|
||||||
struct cue_track_positions * pos;
|
struct cue_track_positions * pos;
|
||||||
uint64_t seek_pos, tc_scale, t;
|
uint64_t seek_pos, tc_scale, track_number;
|
||||||
|
unsigned int t;
|
||||||
struct ebml_list_node * node = ctx->segment.cues.cue_point.head;
|
struct ebml_list_node * node = ctx->segment.cues.cue_point.head;
|
||||||
|
|
||||||
/* If there are no cues loaded, check for cues element in the seek head
|
/* If there are no cues loaded, check for cues element in the seek head
|
||||||
|
@ -1756,7 +1757,13 @@ nestegg_track_seek(nestegg * ctx, unsigned int track, uint64_t tstamp)
|
||||||
while (node) {
|
while (node) {
|
||||||
assert(node->id == ID_CUE_TRACK_POSITIONS);
|
assert(node->id == ID_CUE_TRACK_POSITIONS);
|
||||||
pos = node->data;
|
pos = node->data;
|
||||||
if (ne_get_uint(pos->track, &t) == 0 && t - 1 == track) {
|
if (ne_get_uint(pos->track, &track_number) != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (ne_map_track_number_to_index(ctx, track_number, &t) != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (t == track) {
|
||||||
if (ne_get_uint(pos->cluster_position, &seek_pos) != 0)
|
if (ne_get_uint(pos->cluster_position, &seek_pos) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче