summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-13 14:45:58 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-17 12:01:40 +0200
commit7f8827f28e0d6641fb8c015250f541037e50a208 (patch)
tree274c7dae373da7d1cf835f2a3e1098dad608ff66 /fftools
parent8763b9cc36457a35e6f092a9791c4ba0ab870a24 (diff)
downloadffmpeg-7f8827f28e0d6641fb8c015250f541037e50a208.tar.gz
fftools/ffmpeg_mux: make copy_prior_start private to muxing code
It is no longer used outside of ffmpeg_mux*
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.h1
-rw-r--r--fftools/ffmpeg_mux.c2
-rw-r--r--fftools/ffmpeg_mux.h1
-rw-r--r--fftools/ffmpeg_mux_init.c6
4 files changed, 5 insertions, 5 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index cc72b1cb6e..25c33cf207 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -659,7 +659,6 @@ typedef struct OutputStream {
const char *attachment_filename;
int copy_initial_nonkeyframes;
- int copy_prior_start;
int keep_pix_fmt;
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 01ccac55ce..f52205cf30 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -398,7 +398,7 @@ void of_streamcopy(OutputStream *ost, const AVPacket *pkt, int64_t dts)
return;
if (!ms->streamcopy_started) {
- if (!ost->copy_prior_start &&
+ if (!ms->copy_prior_start &&
(pkt->pts == AV_NOPTS_VALUE ?
dts < ms->ts_copy_start :
pkt->pts < av_rescale_q(ms->ts_copy_start, AV_TIME_BASE_Q, pkt->time_base)))
diff --git a/fftools/ffmpeg_mux.h b/fftools/ffmpeg_mux.h
index 0938a261ee..81c4698161 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_prior_start;
int streamcopy_started;
} MuxStream;
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 555ccfd796..51fdd88232 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -908,7 +908,7 @@ static int streamcopy_init(const Muxer *mux, const OptionsContext *o,
if (ost->st->duration <= 0 && ist->st->duration > 0)
ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base);
- if (!ost->copy_prior_start) {
+ if (!ms->copy_prior_start) {
ms->ts_copy_start = (mux->of.start_time == AV_NOPTS_VALUE) ?
0 : mux->of.start_time;
if (copy_ts && ifile->start_time != AV_NOPTS_VALUE) {
@@ -1156,8 +1156,8 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o,
}
}
- ost->copy_prior_start = -1;
- MATCH_PER_STREAM_OPT(copy_prior_start, i, ost->copy_prior_start, oc ,st);
+ ms->copy_prior_start = -1;
+ MATCH_PER_STREAM_OPT(copy_prior_start, i, ms->copy_prior_start, oc ,st);
MATCH_PER_STREAM_OPT(bitstream_filters, str, bsfs, oc, st);
if (bsfs && *bsfs) {