diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-04 19:50:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-04 20:58:59 +0100 |
commit | 2a23f6035ec4234bd2ea1143e9d5af90469ed669 (patch) | |
tree | 2723d22effc74f0f71c8d6f5cb32c938d2aa3b6b | |
parent | 84aba8eed97d6cb90737a1993c55dbca6a0f1ed5 (diff) | |
download | ffmpeg-2a23f6035ec4234bd2ea1143e9d5af90469ed669.tar.gz |
mpegpsenc: Fix SCR handling for DVD
This makes the initial SCR equal 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg_opt.c | 2 | ||||
-rw-r--r-- | libavformat/mpegenc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index c01ef42571..63e3de959f 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1922,8 +1922,6 @@ static int opt_target(void *optctx, const char *opt, const char *arg) av_dict_set(&o->g->codec_opts, "b:a", "448000", 0); parse_option(o, "ar", "48000", options); - av_dict_set(&o->g->format_opts, "avoid_negative_ts", "1", 0); - } else if (!strncmp(arg, "dv", 2)) { parse_option(o, "f", "dv", options); diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 5d2757adba..ef8d7621ee 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1062,7 +1062,9 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) dts= pkt->dts; if (s->last_scr == AV_NOPTS_VALUE) { - if (dts == AV_NOPTS_VALUE ) { + if (dts == AV_NOPTS_VALUE || s->is_dvd) { + if (dts != AV_NOPTS_VALUE) + s->preload += av_rescale(-dts, AV_TIME_BASE, 90000); s->last_scr = 0; } else { s->last_scr = dts + preload; |