Revision 54a5c719

View differences:

libavformat/mov.c
1525 1525
    if (sc->ctts_data) {
1526 1526
        time_sample = 0;
1527 1527
        for (i = 0; i < sc->ctts_count; i++) {
1528
            time_sample += sc->ctts_data[i].count;
1529
            if (time_sample >= sc->current_sample) {
1528
            int next = time_sample + sc->ctts_data[i].count;
1529
            if (next > sc->current_sample) {
1530 1530
                sc->sample_to_ctime_index = i;
1531
                sc->sample_to_ctime_sample = time_sample - sc->current_sample;
1531
                sc->sample_to_ctime_sample = sc->current_sample - time_sample;
1532 1532
                break;
1533 1533
            }
1534
            time_sample = next;
1534 1535
        }
1535 1536
    }
1536 1537
    return sample;

Also available in: Unified diff