[FFmpeg-cvslog] avformat/tee: Rescale ts using av_packet_rescale_ts

Jan Sebechlebsky git at videolan.org
Sat Jul 23 21:09:34 EEST 2016


ffmpeg | branch: master | Jan Sebechlebsky <sebechlebskyjan at gmail.com> | Sat Jul 16 13:27:50 2016 +0200| [75bd5d3e2dde249e488f0e72284339e21aefa5c8] | committer: Marton Balint

avformat/tee: Rescale ts using av_packet_rescale_ts

This ensures that AV_NOPTS_VALUE value is handled
correctly.

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=75bd5d3e2dde249e488f0e72284339e21aefa5c8
---

 libavformat/tee.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index daddba5..b4158e1 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,



More information about the ffmpeg-cvslog mailing list