[FFmpeg-devel] [PATCH 24/25] fftools/ffmpeg_mux: make copy_initial_nonkeyframes private to muxing code

Anton Khirnov anton at khirnov.net
Thu Apr 13 17:12:22 EEST 2023


It is no longer used outside of ffmpeg_mux*
---
 fftools/ffmpeg.h          | 1 -
 fftools/ffmpeg_mux.c      | 2 +-
 fftools/ffmpeg_mux.h      | 1 +
 fftools/ffmpeg_mux_init.c | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 25c33cf207..494ea4abd3 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -658,7 +658,6 @@ typedef struct OutputStream {
     int inputs_done;
 
     const char *attachment_filename;
-    int copy_initial_nonkeyframes;
 
     int keep_pix_fmt;
 
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index f52205cf30..7778510d2c 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -394,7 +394,7 @@ void of_streamcopy(OutputStream *ost, const AVPacket *pkt, int64_t dts)
     }
 
     if (!ms->streamcopy_started && !(pkt->flags & AV_PKT_FLAG_KEY) &&
-        !ost->copy_initial_nonkeyframes)
+        !ms->copy_initial_nonkeyframes)
         return;
 
     if (!ms->streamcopy_started) {
diff --git a/fftools/ffmpeg_mux.h b/fftools/ffmpeg_mux.h
index 81c4698161..7e0454dfba 100644
--- a/fftools/ffmpeg_mux.h
+++ b/fftools/ffmpeg_mux.h
@@ -75,6 +75,7 @@ typedef struct MuxStream {
     // combined size of all the packets sent to the muxer
     uint64_t data_size_mux;
 
+    int copy_initial_nonkeyframes;
     int copy_prior_start;
     int streamcopy_started;
 } MuxStream;
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index bfa84f5a28..5b3606084e 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -1208,7 +1208,7 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o,
     ost->last_mux_dts = AV_NOPTS_VALUE;
 
     MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i,
-                         ost->copy_initial_nonkeyframes, oc, st);
+                         ms->copy_initial_nonkeyframes, oc, st);
 
     switch (type) {
     case AVMEDIA_TYPE_VIDEO:      new_stream_video     (mux, o, ost); break;
-- 
2.39.1



More information about the ffmpeg-devel mailing list