Revision f14a201b libavformat/matroskadec.c

View differences:

libavformat/matroskadec.c
1423 1423
                                uint64_t duration, int is_keyframe,
1424 1424
                                int64_t cluster_pos)
1425 1425
{
1426
    uint64_t timecode = AV_NOPTS_VALUE;
1426 1427
    MatroskaTrack *track;
1427 1428
    int res = 0;
1428 1429
    AVStream *st;
......
1458 1459
    if (is_keyframe == -1)
1459 1460
        is_keyframe = flags & 0x80 ? PKT_FLAG_KEY : 0;
1460 1461

  
1462
    if (cluster_time != (uint64_t)-1
1463
        && (block_time >= 0 || cluster_time >= -block_time)) {
1464
        timecode = cluster_time + block_time;
1465
        if (is_keyframe)
1466
            av_add_index_entry(st, cluster_pos, timecode, 0,0,AVINDEX_KEYFRAME);
1467
    }
1468

  
1461 1469
    if (matroska->skip_to_keyframe) {
1462 1470
        if (!is_keyframe || st != matroska->skip_to_stream)
1463 1471
            return res;
......
1541 1549
    }
1542 1550

  
1543 1551
    if (res == 0) {
1544
        uint64_t timecode = AV_NOPTS_VALUE;
1545

  
1546
        if (cluster_time != (uint64_t)-1
1547
            && (block_time >= 0 || cluster_time >= -block_time)) {
1548
            timecode = cluster_time + block_time;
1549
            if (is_keyframe)
1550
                av_add_index_entry(st, cluster_pos, timecode,
1551
                                   0, 0, AVINDEX_KEYFRAME);
1552
        }
1553

  
1554 1552
        for (n = 0; n < laces; n++) {
1555 1553
            if (st->codec->codec_id == CODEC_ID_RA_288 ||
1556 1554
                st->codec->codec_id == CODEC_ID_COOK ||

Also available in: Unified diff