diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-02-27 17:47:15 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-02-28 19:20:25 +0100 |
commit | 89f9f69e3fa50083fd9df9c0628885c88f36bf4a (patch) | |
tree | cd6be53ead483cd12aecb06db2573d85b080059e /libavformat/utils.c | |
parent | bf63a474cabb6e4114bd3f87272276017e07f775 (diff) | |
download | ffmpeg-89f9f69e3fa50083fd9df9c0628885c88f36bf4a.tar.gz |
lavf: rescale duration for chained muxers.
Fix trac ticket #2300 because the duration of the segments
was computed using the timestamp of the last packet plus its
duration using the 1/90000 default time base instead of using
the chained muxer time base.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 3df8c51ddd..60242056f1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3967,6 +3967,10 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, local_pkt.dts = av_rescale_q(pkt->dts, src->streams[pkt->stream_index]->time_base, dst->streams[dst_stream]->time_base); + if (pkt->duration) + local_pkt.duration = av_rescale_q(pkt->duration, + src->streams[pkt->stream_index]->time_base, + dst->streams[dst_stream]->time_base); return av_write_frame(dst, &local_pkt); } |