summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-03-20 16:50:19 +0100
committerAnton Khirnov <anton@khirnov.net>2023-04-09 15:47:45 +0200
commit8e23a62eff08715ce5ec021c7b4de7ad9c716089 (patch)
treee36e20b4c0e9ae7fc2a6c073e1adced1b33e97ea
parente1d12aaa453b267011c388f7de8cfb6936d08fec (diff)
downloadffmpeg-8e23a62eff08715ce5ec021c7b4de7ad9c716089.tar.gz
fftools/ffmpeg: drop InputStream.processing_needed
It is equivalent to !InputStream.discard.
-rw-r--r--fftools/ffmpeg.c4
-rw-r--r--fftools/ffmpeg.h1
-rw-r--r--fftools/ffmpeg_filter.c1
-rw-r--r--fftools/ffmpeg_mux_init.c3
4 files changed, 2 insertions, 7 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index cb7cec68e5..3a68640cad 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3648,7 +3648,7 @@ static void decode_flush(InputFile *ifile)
InputStream *ist = ifile->streams[i];
int ret;
- if (!ist->processing_needed)
+ if (ist->discard)
continue;
do {
@@ -3793,7 +3793,7 @@ static int process_input(int file_index)
for (i = 0; i < ifile->nb_streams; i++) {
ist = ifile->streams[i];
- if (ist->processing_needed) {
+ if (!ist->discard) {
ret = process_input_packet(ist, NULL, 0);
if (ret>0)
return 0;
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 823218e214..791deedc07 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -342,7 +342,6 @@ typedef struct InputStream {
int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
#define DECODING_FOR_OST 1
#define DECODING_FOR_FILTER 2
- int processing_needed; /* non zero if the packets must be processed */
// should attach FrameData as opaque_ref after decoding
int want_frame_data;
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 4fde120067..314b89b585 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -296,7 +296,6 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
ist->discard = 0;
ist->decoding_needed |= DECODING_FOR_FILTER;
- ist->processing_needed = 1;
ist->st->discard = AVDISCARD_NONE;
ifilter = ALLOC_ARRAY_ELEM(fg->inputs, fg->nb_inputs);
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index bfe2abbe0b..f426db5820 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -2283,7 +2283,6 @@ int of_open(const OptionsContext *o, const char *filename)
if (ost->enc_ctx && ost->ist) {
InputStream *ist = ost->ist;
ist->decoding_needed |= DECODING_FOR_OST;
- ist->processing_needed = 1;
if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||
ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
@@ -2294,8 +2293,6 @@ int of_open(const OptionsContext *o, const char *filename)
exit_program(1);
}
}
- } else if (ost->ist) {
- ost->ist->processing_needed = 1;
}
/* set the filter output constraints */