[FFmpeg-devel] [PATCH 22/25] fftools/ffmpeg_mux: make streamcopy_started private to muxing code
Anton Khirnov
anton at khirnov.net
Thu Apr 13 17:12:20 EEST 2023
It is no longer used outside of ffmpeg_mux*
---
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 {
--
2.39.1
More information about the ffmpeg-devel
mailing list