[FFmpeg-cvslog] mpegpsenc: move preload recalculation to where its needed

Michael Niedermayer git at videolan.org
Fri Jan 4 21:04:40 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan  4 20:15:11 2013 +0100| [9fd0cf8a3b9e8bb7d93f04e0a97033902c1e8a4f] | committer: Michael Niedermayer

mpegpsenc: move preload recalculation to where its needed

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mpegenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index ef8d762..ea17e38 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;



More information about the ffmpeg-cvslog mailing list