[FFmpeg-cvslog] fftools/ffmpeg_mux: make streamcopy_started private to muxing code

Anton Khirnov git at videolan.org
Mon Apr 17 13:07:43 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Apr 13 14:45:58 2023 +0200| [8763b9cc36457a35e6f092a9791c4ba0ab870a24] | committer: Anton Khirnov

fftools/ffmpeg_mux: make streamcopy_started private to muxing code

It is no longer used outside of ffmpeg_mux*

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8763b9cc36457a35e6f092a9791c4ba0ab870a24
---

 fftools/ffmpeg.h     | 1 -
 fftools/ffmpeg_mux.c | 6 +++---
 fftools/ffmpeg_mux.h | 2 ++
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index e626fac18a..cc72b1cb6e 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -658,7 +658,6 @@ typedef struct OutputStream {
     int inputs_done;
 
     const char *attachment_filename;
-    int streamcopy_started;
     int copy_initial_nonkeyframes;
     int copy_prior_start;
 
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index d832116c12..01ccac55ce 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -393,11 +393,11 @@ void of_streamcopy(OutputStream *ost, const AVPacket *pkt, int64_t dts)
         return;
     }
 
-    if (!ost->streamcopy_started && !(pkt->flags & AV_PKT_FLAG_KEY) &&
+    if (!ms->streamcopy_started && !(pkt->flags & AV_PKT_FLAG_KEY) &&
         !ost->copy_initial_nonkeyframes)
         return;
 
-    if (!ost->streamcopy_started) {
+    if (!ms->streamcopy_started) {
         if (!ost->copy_prior_start &&
             (pkt->pts == AV_NOPTS_VALUE ?
              dts < ms->ts_copy_start :
@@ -451,7 +451,7 @@ void of_streamcopy(OutputStream *ost, const AVPacket *pkt, int64_t dts)
 
     of_output_packet(of, opkt, ost, 0);
 
-    ost->streamcopy_started = 1;
+    ms->streamcopy_started = 1;
 }
 
 static int thread_stop(Muxer *mux)
diff --git a/fftools/ffmpeg_mux.h b/fftools/ffmpeg_mux.h
index 25cf1b547f..0938a261ee 100644
--- a/fftools/ffmpeg_mux.h
+++ b/fftools/ffmpeg_mux.h
@@ -74,6 +74,8 @@ typedef struct MuxStream {
 
     // combined size of all the packets sent to the muxer
     uint64_t data_size_mux;
+
+    int streamcopy_started;
 } MuxStream;
 
 typedef struct Muxer {



More information about the ffmpeg-cvslog mailing list