aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-08-03 20:49:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-08-03 20:49:53 +0000
commitc0dd7b7c94427f40c43ccf8f4e53eaa36cde2697 (patch)
tree18454aa3f9517af679bf7db3693f859e83fbdf39
parentaebe25f3b153f0d7f9ab737b85e198d2760216ec (diff)
downloadffmpeg-c0dd7b7c94427f40c43ccf8f4e53eaa36cde2697.tar.gz
get rid of some double timebase convertion
Originally committed as revision 9878 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 4b57b0218b..8ec10a2f43 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1230,14 +1230,11 @@ static int output_packet(AVInputStream *ist, int ist_index,
else
opkt.pts= AV_NOPTS_VALUE;
- {
- int64_t dts;
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
- dts= av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
- opkt.dts= av_rescale_q(dts, AV_TIME_BASE_Q, ost->st->time_base);
- }
+ opkt.dts = av_rescale_q(pkt->dts, 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;