mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
get rid of some double timebase convertion
Originally committed as revision 9878 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
aebe25f3b1
commit
c0dd7b7c94
9
ffmpeg.c
9
ffmpeg.c
@ -1230,14 +1230,11 @@ static int output_packet(AVInputStream *ist, int ist_index,
|
|||||||
else
|
else
|
||||||
opkt.pts= AV_NOPTS_VALUE;
|
opkt.pts= AV_NOPTS_VALUE;
|
||||||
|
|
||||||
{
|
|
||||||
int64_t dts;
|
|
||||||
if (pkt->dts == AV_NOPTS_VALUE)
|
if (pkt->dts == AV_NOPTS_VALUE)
|
||||||
dts = ist->next_pts;
|
opkt.dts = av_rescale_q(ist->next_pts, AV_TIME_BASE_Q, ost->st->time_base);
|
||||||
else
|
else
|
||||||
dts= av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
|
opkt.dts = av_rescale_q(pkt->dts, ist->st->time_base, ost->st->time_base);
|
||||||
opkt.dts= av_rescale_q(dts, AV_TIME_BASE_Q, ost->st->time_base);
|
|
||||||
}
|
|
||||||
opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->st->time_base);
|
opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->st->time_base);
|
||||||
opkt.flags= pkt->flags;
|
opkt.flags= pkt->flags;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user