Commit 789dcfaf authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

avformat/mux: Use av_packet_rescale_ts

ff_write_chained essentially duplicated the functionality of
av_packet_rescale_ts. This has been changed.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 11477595
......@@ -1323,18 +1323,10 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
local_pkt = *pkt;
local_pkt.stream_index = dst_stream;
if (pkt->pts != AV_NOPTS_VALUE)
local_pkt.pts = av_rescale_q(pkt->pts,
src->streams[pkt->stream_index]->time_base,
dst->streams[dst_stream]->time_base);
if (pkt->dts != AV_NOPTS_VALUE)
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);
av_packet_rescale_ts(&local_pkt,
src->streams[pkt->stream_index]->time_base,
dst->streams[dst_stream]->time_base);
if (interleave) ret = av_interleaved_write_frame(dst, &local_pkt);
else ret = av_write_frame(dst, &local_pkt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment