diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-09-26 18:13:55 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-29 14:33:00 +0200 |
commit | 948f3c19a8bd069768ca411212aaf8c1ed96b10d (patch) | |
tree | 159e78bd8057aa0d7ff10fac4577ce8bb5170576 /libavformat/matroskaenc.c | |
parent | d00bb8addccb63fa3feacb06d2a310731dc0113b (diff) |
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 498f479a77..db86e88557 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1394,7 +1394,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts; av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, " - "pts %" PRId64 ", dts %" PRId64 ", duration %d, flags %d\n", + "pts %" PRId64 ", dts %" PRId64 ", duration %" PRId64 ", flags %d\n", avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration, flags); if (codec->codec_id == AV_CODEC_ID_H264 && codec->extradata_size > 0 && (AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1)) @@ -1527,7 +1527,13 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt) } else { ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP, mkv_blockgroup_size(pkt->size)); - duration = pkt->convergence_duration; + duration = pkt->duration; +#if FF_API_CONVERGENCE_DURATION +FF_DISABLE_DEPRECATION_WARNINGS + if (pkt->convergence_duration) + duration = pkt->convergence_duration; +FF_ENABLE_DEPRECATION_WARNINGS +#endif mkv_write_block(s, pb, MATROSKA_ID_BLOCK, pkt, 0); put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); end_ebml_master(pb, blockgroup); |