Commit 5b6c0fdb authored by Simon Thelen's avatar Simon Thelen Committed by Michael Niedermayer

ffmpeg: When streamcopying, only add the input seek position when copying timestamps.

Using -ss as an input option shifts timestamps down by the seek, so it
doesn't have to be added to the recording time when checking whether to
stop.

Fixes #977
Signed-off-by: 's avatarSimon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 293c170f
......@@ -1831,7 +1831,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
if (f->recording_time != INT64_MAX) {
start_time = f->ctx->start_time;
if (f->start_time != AV_NOPTS_VALUE)
if (f->start_time != AV_NOPTS_VALUE && copy_ts)
start_time += f->start_time;
if (ist->pts >= f->recording_time + start_time) {
close_output_stream(ost);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment