summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorSimon Thelen <ffmpeg-dev@c-14.de>2015-11-22 15:03:17 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-05 04:24:22 +0100
commit5b6c0fdb4316ef71ef151e8b0f9137fe64877589 (patch)
tree02c7f42055074ed33bb93eccf3ccd58d8ee8e253 /ffmpeg.c
parent293c170f59414647b9bba9cb4602eb92989fd4ba (diff)
downloadffmpeg-streaming-5b6c0fdb4316ef71ef151e8b0f9137fe64877589.zip
ffmpeg-streaming-5b6c0fdb4316ef71ef151e8b0f9137fe64877589.tar.gz
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: Simon Thelen <ffmpeg-dev@c-14.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 82d9a6c..a866f72 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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);
OpenPOWER on IntegriCloud