Revision 086b0ad8

View differences:

libavformat/matroska.c
2593 2593

  
2594 2594
                pkt->pts = timecode;
2595 2595
                pkt->pos = pos;
2596
                pkt->duration = duration;
2596 2597

  
2597 2598
                if (matroska->tracks[track]->flags & MATROSKA_TRACK_REORDER)
2598 2599
                    matroska_queue_packet_reordered(matroska, pkt, is_bframe);
......
2692 2693
                                   duration, is_keyframe, is_bframe,
2693 2694
                                   &track, &pkt);
2694 2695

  
2695
    if (pkt)
2696
    {
2697
        if (duration != AV_NOPTS_VALUE)
2698
            pkt->duration = duration;
2699
        else if (track >= 0 && track < matroska->num_tracks)
2700
            pkt->duration = matroska->tracks[track]->default_duration;
2701
    }
2702

  
2703 2696
    return res;
2704 2697
}
2705 2698

  

Also available in: Unified diff