1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

fftools/ffmpeg: drop InputStream.processing_needed

It is equivalent to !InputStream.discard.
This commit is contained in:
Anton Khirnov
2023-03-20 16:50:19 +01:00
parent e1d12aaa45
commit 8e23a62eff
4 changed files with 2 additions and 7 deletions

View File

@@ -3648,7 +3648,7 @@ static void decode_flush(InputFile *ifile)
InputStream *ist = ifile->streams[i]; InputStream *ist = ifile->streams[i];
int ret; int ret;
if (!ist->processing_needed) if (ist->discard)
continue; continue;
do { do {
@@ -3793,7 +3793,7 @@ static int process_input(int file_index)
for (i = 0; i < ifile->nb_streams; i++) { for (i = 0; i < ifile->nb_streams; i++) {
ist = ifile->streams[i]; ist = ifile->streams[i];
if (ist->processing_needed) { if (!ist->discard) {
ret = process_input_packet(ist, NULL, 0); ret = process_input_packet(ist, NULL, 0);
if (ret>0) if (ret>0)
return 0; return 0;

View File

@@ -342,7 +342,6 @@ typedef struct InputStream {
int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */ 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_OST 1
#define DECODING_FOR_FILTER 2 #define DECODING_FOR_FILTER 2
int processing_needed; /* non zero if the packets must be processed */
// should attach FrameData as opaque_ref after decoding // should attach FrameData as opaque_ref after decoding
int want_frame_data; int want_frame_data;

View File

@@ -296,7 +296,6 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
ist->discard = 0; ist->discard = 0;
ist->decoding_needed |= DECODING_FOR_FILTER; ist->decoding_needed |= DECODING_FOR_FILTER;
ist->processing_needed = 1;
ist->st->discard = AVDISCARD_NONE; ist->st->discard = AVDISCARD_NONE;
ifilter = ALLOC_ARRAY_ELEM(fg->inputs, fg->nb_inputs); ifilter = ALLOC_ARRAY_ELEM(fg->inputs, fg->nb_inputs);

View File

@@ -2283,7 +2283,6 @@ int of_open(const OptionsContext *o, const char *filename)
if (ost->enc_ctx && ost->ist) { if (ost->enc_ctx && ost->ist) {
InputStream *ist = ost->ist; InputStream *ist = ost->ist;
ist->decoding_needed |= DECODING_FOR_OST; ist->decoding_needed |= DECODING_FOR_OST;
ist->processing_needed = 1;
if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||
ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
@@ -2294,8 +2293,6 @@ int of_open(const OptionsContext *o, const char *filename)
exit_program(1); exit_program(1);
} }
} }
} else if (ost->ist) {
ost->ist->processing_needed = 1;
} }
/* set the filter output constraints */ /* set the filter output constraints */