Revision e0e4be59 libavformat/matroskadec.c

View differences:

libavformat/matroskadec.c
1076 1076
    EbmlList *index_list;
1077 1077
    MatroskaIndex *index;
1078 1078
    int index_scale = 1;
1079
    uint64_t max_start = 0;
1079 1080
    Ebml ebml = { 0 };
1080 1081
    AVStream *st;
1081 1082
    int i, j;
......
1365 1366

  
1366 1367
    chapters = chapters_list->elem;
1367 1368
    for (i=0; i<chapters_list->nb_elem; i++)
1368
        if (chapters[i].start != AV_NOPTS_VALUE && chapters[i].uid)
1369
        if (chapters[i].start != AV_NOPTS_VALUE && chapters[i].uid
1370
            && (max_start==0 || chapters[i].start > max_start)) {
1369 1371
            ff_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000},
1370 1372
                           chapters[i].start, chapters[i].end,
1371 1373
                           chapters[i].title);
1374
            max_start = chapters[i].start;
1375
        }
1372 1376

  
1373 1377
    index_list = &matroska->index;
1374 1378
    index = index_list->elem;

Also available in: Unified diff