summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
authorGyan Doshi <ffmpeg@gyani.pro>2022-10-21 19:29:25 +0530
committerGyan Doshi <ffmpeg@gyani.pro>2022-11-03 14:38:42 +0530
commit5ccd4d306054cec839e9078203a3b3892a3372a2 (patch)
tree150b47214861711fb022792ac866b6c738d67b03 /fftools/ffmpeg.c
parent93faba449c0dc9d953d9aeb381f03728ff66e2cb (diff)
ffmpeg: fix implementation of updated input start time
The current adjustment of input start times just adjusts the tsoffset. And it does so, by resetting the tsoffset to nullify the new start time. This leads to breakage of -copyts, ignoring of input_ts_offset, breaking of -isync as well as breaking wrap correction. Fixed by taking cognizance of these parameters, and by correcting start times just before sync offsets are applied.
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 62eb3e374b..e6f6773f6a 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1813,7 +1813,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
start_time = 0;
if (copy_ts) {
start_time += f->start_time != AV_NOPTS_VALUE ? f->start_time : 0;
- start_time += start_at_zero ? 0 : f->ctx->start_time;
+ start_time += start_at_zero ? 0 : f->start_time_effective;
}
if (ist->pts >= f->recording_time + start_time) {
close_output_stream(ost);