Revision f9ff7179

View differences:

libavformat/matroskaenc.c
72 72
    int64_t         segment_uid;
73 73
    ebml_master     cluster;
74 74
    int64_t         cluster_pos;        ///< file offset of the current cluster
75
    uint64_t        cluster_pts;
75
    int64_t         cluster_pts;
76 76
    int64_t         duration_offset;
77
    uint64_t        duration;
77
    int64_t         duration;
78 78
    mkv_seekhead    *main_seekhead;
79 79
    mkv_seekhead    *cluster_seekhead;
80 80
    mkv_cues        *cues;
......
355 355
    if (entries == NULL)
356 356
        return AVERROR(ENOMEM);
357 357

  
358
    if (ts < 0)
359
        return 0;
360

  
358 361
    entries[cues->num_entries  ].pts = ts;
359 362
    entries[cues->num_entries  ].tracknum = stream + 1;
360 363
    entries[cues->num_entries++].cluster_pos = cluster_pos - cues->segment_offset;
......
883 886

  
884 887
        mkv->cluster_pos = url_ftell(s->pb);
885 888
        mkv->cluster = start_ebml_master(pb, MATROSKA_ID_CLUSTER, 0);
886
        put_ebml_uint(pb, MATROSKA_ID_CLUSTERTIMECODE, ts);
887
        mkv->cluster_pts = ts;
889
        put_ebml_uint(pb, MATROSKA_ID_CLUSTERTIMECODE, FFMAX(0, ts));
890
        mkv->cluster_pts = FFMAX(0, ts);
888 891
        av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size));
889 892
    }
890 893

  

Also available in: Unified diff