diff mbox series

[FFmpeg-devel,5/9] fftools/ffmpeg: drop never-set OutputStream.first_pts

Message ID 20220928095556.28209-5-anton@khirnov.net
State Accepted
Commit 76678b71372a55cd1e4f431d1fa4b7c604ba83c3
Headers show
Series [FFmpeg-devel,1/9] fftools/ffmpeg: drop the -async option | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Sept. 28, 2022, 9:55 a.m. UTC
---
 fftools/ffmpeg.c | 2 +-
 fftools/ffmpeg.h | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 697971167c..971c146fea 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -763,7 +763,7 @@  static int check_recording_time(OutputStream *ost)
     OutputFile *of = output_files[ost->file_index];
 
     if (of->recording_time != INT64_MAX &&
-        av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time,
+        av_compare_ts(ost->sync_opts, ost->enc_ctx->time_base, of->recording_time,
                       AV_TIME_BASE_Q) >= 0) {
         close_output_stream(ost);
         return 0;
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 8acc83e92a..a9883c0442 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -495,9 +495,6 @@  typedef struct OutputStream {
     /* input pts and corresponding output pts
        for A/V sync */
     int64_t sync_opts;       /* output frame counter, could be changed to some true timestamp */ // FIXME look at frame_number
-    /* pts of the first frame encoded for this stream, used for limiting
-     * recording time */
-    int64_t first_pts;
     /* dts of the last packet sent to the muxing queue, in AV_TIME_BASE_Q */
     int64_t last_mux_dts;
     /* pts of the last frame received from the filters, in AV_TIME_BASE_Q */