diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-08-03 11:32:10 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-08-08 16:20:58 +0200 |
commit | 8e092c3eac399d457e470decffa1081251d00648 (patch) | |
tree | f94a867475f826836297c8c8756f5100213000c6 /fftools/ffmpeg.c | |
parent | 80e7feb48b99660754f4313bb12b216aeacebf4f (diff) | |
download | ffmpeg-8e092c3eac399d457e470decffa1081251d00648.tar.gz |
fftools/ffmpeg: remove OutputStream.encoding_needed
It is unnecessary, as it is always exactly equivalent to !!ost->enc_ctx
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r-- | fftools/ffmpeg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index cf61706ac0..a38e758e77 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1536,7 +1536,7 @@ static void print_final_stats(int64_t total_size) av_log(NULL, AV_LOG_VERBOSE, " Output stream #%d:%d (%s): ", i, j, av_get_media_type_string(type)); - if (ost->encoding_needed) { + if (ost->enc_ctx) { av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" frames encoded", ost->frames_encoded); if (type == AVMEDIA_TYPE_AUDIO) @@ -1788,7 +1788,7 @@ static void flush_encoders(void) AVCodecContext *enc = ost->enc_ctx; OutputFile *of = output_files[ost->file_index]; - if (!ost->encoding_needed) + if (!enc) continue; // Try to enable encoding with no input frames. @@ -2359,7 +2359,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output, for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; - if (!check_output_constraints(ist, ost) || !ost->encoding_needed + if (!check_output_constraints(ist, ost) || !ost->enc_ctx || ost->enc->type != AVMEDIA_TYPE_SUBTITLE) continue; @@ -2568,7 +2568,7 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; - if (!check_output_constraints(ist, ost) || ost->encoding_needed || + if (!check_output_constraints(ist, ost) || ost->enc_ctx || (!pkt && no_eof)) continue; @@ -3137,7 +3137,7 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame, OutputFile *of = output_files[ost->file_index]; int ret = 0; - if (ost->encoding_needed) { + if (ost->enc_ctx) { const AVCodec *codec = ost->enc; AVCodecContext *dec = NULL; InputStream *ist; |