Skip to content
Snippets Groups Projects
Commit 89f9f69e authored by Nicolas George's avatar Nicolas George
Browse files

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.
parent bf63a474
No related branches found
No related tags found
No related merge requests found
...@@ -3967,6 +3967,10 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, ...@@ -3967,6 +3967,10 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
local_pkt.dts = av_rescale_q(pkt->dts, local_pkt.dts = av_rescale_q(pkt->dts,
src->streams[pkt->stream_index]->time_base, src->streams[pkt->stream_index]->time_base,
dst->streams[dst_stream]->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); return av_write_frame(dst, &local_pkt);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment