aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_mux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-09-24 10:25:12 +0200
committerAnton Khirnov <anton@khirnov.net>2024-09-30 09:29:18 +0200
commit64f3feb8492df8255d98ff325c51382c86cf2c5a (patch)
tree51be259303bed6b1aaa9d65dff8ae9af8f82634c /fftools/ffmpeg_mux.c
parent434377a7647f4beb2182ea9f27abb6a84347f42c (diff)
downloadffmpeg-64f3feb8492df8255d98ff325c51382c86cf2c5a.tar.gz
fftools/ffmpeg_mux: move OutputStream.enc_ctx to Encoder
The encoding AVCodecContext is a part of the encoder, and so should live there.
Diffstat (limited to 'fftools/ffmpeg_mux.c')
-rw-r--r--fftools/ffmpeg_mux.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 1980e3287c..25f66dd185 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -661,8 +661,8 @@ static int check_written(OutputFile *of)
total_packets_written += packets_written;
- if (ost->enc_ctx &&
- (ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2))
+ if (ost->enc &&
+ (ost->enc->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2))
!= AV_CODEC_FLAG_PASS1)
pass1_used = 0;
@@ -837,10 +837,6 @@ static void ost_free(OutputStream **post)
av_freep(&ost->attachment_filename);
- if (ost->enc_ctx)
- av_freep(&ost->enc_ctx->stats_in);
- avcodec_free_context(&ost->enc_ctx);
-
enc_stats_uninit(&ost->enc_stats_pre);
enc_stats_uninit(&ost->enc_stats_post);
enc_stats_uninit(&ms->stats);