From 9406d6be55db25190b442ffdb2e6bc5d46904fb6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 14 Nov 2012 01:42:33 +0100 Subject: [PATCH] ffmpeg: fix audio timestamps on stream copy with -ss Signed-off-by: Michael Niedermayer --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index effaf2f925..8f10304bae 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1367,7 +1367,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p duration = ist->st->codec->frame_size; opkt.dts = opkt.pts = av_rescale_delta(ist->st->time_base, pkt->dts, (AVRational){1, ist->st->codec->sample_rate}, duration, &ist->filter_in_rescale_delta_last, - ost->st->time_base); + ost->st->time_base) - ost_tb_start_time;; } opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->st->time_base);