summaryrefslogtreecommitdiff
path: root/libavformat/mpegenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-04 20:15:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-04 20:58:59 +0100
commit9fd0cf8a3b9e8bb7d93f04e0a97033902c1e8a4f (patch)
tree4ae670b55d21842754bc72bb5f1195571f309797 /libavformat/mpegenc.c
parent2a23f6035ec4234bd2ea1143e9d5af90469ed669 (diff)
downloadffmpeg-9fd0cf8a3b9e8bb7d93f04e0a97033902c1e8a4f.tar.gz
mpegpsenc: move preload recalculation to where its needed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index ef8d7621ee..ea17e386eb 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1070,8 +1070,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
s->last_scr = dts + preload;
s->preload *= 2;
}
+ preload = av_rescale(s->preload, 90000, AV_TIME_BASE);
}
- preload = av_rescale(s->preload, 90000, AV_TIME_BASE);
if (dts != AV_NOPTS_VALUE) dts += preload;
if (pts != AV_NOPTS_VALUE) pts += preload;