Revision d766800b

View differences:

libavformat/matroska.c
2417 2417

  
2418 2418
                if (res == 0) {
2419 2419
                    for (n = 0; n < laces; n++) {
2420
                        uint64_t timecode = 0;
2420
                        uint64_t timecode = AV_NOPTS_VALUE;
2421 2421

  
2422 2422
                        pkt = av_mallocz(sizeof(AVPacket));
2423 2423
                        /* XXX: prevent data copy... */
......
2425 2425
                            res = AVERROR_NOMEM;
2426 2426
                            break;
2427 2427
                        }
2428
                        if (cluster_time != (uint64_t)-1) {
2429
                            if (block_time < 0 && (-block_time) > cluster_time)
2430
                                timecode = cluster_time;
2431
                            else
2428
                        if (cluster_time != (uint64_t)-1 && n == 0) {
2429
                            if (cluster_time + block_time >= 0)
2432 2430
                                timecode = cluster_time + block_time;
2433 2431
                        }
2434 2432
                        /* FIXME: duration */

Also available in: Unified diff