diff options
author | Jan Sebechlebsky <sebechlebskyjan@gmail.com> | 2016-07-16 13:27:50 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-07-23 20:02:05 +0200 |
commit | 75bd5d3e2dde249e488f0e72284339e21aefa5c8 (patch) | |
tree | 4fcdde40fa01f17762f461f292c8c38864487479 /libavformat/tee.c | |
parent | ece12db4f1a57d453c33cdd3baf64478034dab42 (diff) | |
download | ffmpeg-75bd5d3e2dde249e488f0e72284339e21aefa5c8.tar.gz |
avformat/tee: Rescale ts using av_packet_rescale_ts
This ensures that AV_NOPTS_VALUE value is handled
correctly.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r-- | libavformat/tee.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/tee.c b/libavformat/tee.c index daddba5741..b4158e18c1 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -543,9 +543,7 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt) } tb = avf ->streams[s ]->time_base; tb2 = avf2->streams[s2]->time_base; - pkt2.pts = av_rescale_q(pkt->pts, tb, tb2); - pkt2.dts = av_rescale_q(pkt->dts, tb, tb2); - pkt2.duration = av_rescale_q(pkt->duration, tb, tb2); + av_packet_rescale_ts(&pkt2, tb, tb2); pkt2.stream_index = s2; if ((ret = av_apply_bitstream_filters(avf2->streams[s2]->codec, &pkt2, |