diff --git a/media/libnestegg/README_MOZILLA b/media/libnestegg/README_MOZILLA index 17166d0161ea..4d81325faecf 100644 --- a/media/libnestegg/README_MOZILLA +++ b/media/libnestegg/README_MOZILLA @@ -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 git commit ID used was 1b1ecd43d1416aec159e1dd41331289aa144bbc4. +The git commit ID used was 231bff74be5ccfb3caf111266449e6a431712675. diff --git a/media/libnestegg/src/nestegg.c b/media/libnestegg/src/nestegg.c index 77ec11959241..b5c07c670123 100644 --- a/media/libnestegg/src/nestegg.c +++ b/media/libnestegg/src/nestegg.c @@ -1727,7 +1727,8 @@ nestegg_track_seek(nestegg * ctx, unsigned int track, uint64_t tstamp) int r; struct cue_point * cue_point; 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; /* 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) { assert(node->id == ID_CUE_TRACK_POSITIONS); 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) return -1; break;