Browse Source

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>
tags/n3.2
Jan Sebechlebsky Marton Balint 9 years ago
parent
commit
75bd5d3e2d
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      libavformat/tee.c

+ 1
- 3
libavformat/tee.c View File

@@ -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,


Loading…
Cancel
Save