summaryrefslogtreecommitdiff
path: root/libavformat/mpegenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index b37a774295..f94b9fa8fa 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1160,6 +1160,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
pts= pkt->pts;
dts= pkt->dts;
+ if(!s->last_scr)
+ s->last_scr= dts;
if(pts != AV_NOPTS_VALUE) pts += preload;
if(dts != AV_NOPTS_VALUE) dts += preload;