summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_mux_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r--fftools/ffmpeg_mux_init.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 219be5f965..8f4b73f8a7 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -1356,12 +1356,6 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type,
if (oc->oformat->flags & AVFMT_GLOBALHEADER && ost->enc_ctx)
ost->enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
- av_dict_copy(&ost->sws_dict, o->g->sws_dict, 0);
-
- av_dict_copy(&ost->swr_opts, o->g->swr_opts, 0);
- if (ost->enc_ctx && av_get_exact_bits_per_sample(ost->enc_ctx->codec_id) == 24)
- av_dict_set(&ost->swr_opts, "output_sample_bits", "24", 0);
-
MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i,
ms->copy_initial_nonkeyframes, oc, st);
@@ -1392,10 +1386,13 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type,
.vsync_method = vsync_method,
.sample_rate = ost->enc_ctx->sample_rate,
.ch_layout = ost->enc_ctx->ch_layout,
+ .sws_opts = o->g->sws_dict,
+ .swr_opts = o->g->swr_opts,
.output_tb = enc_tb,
.ts_offset = mux->of.start_time == AV_NOPTS_VALUE ?
0 : mux->of.start_time,
- .flags = OFILTER_FLAG_DISABLE_CONVERT * !!keep_pix_fmt,
+ .flags = OFILTER_FLAG_DISABLE_CONVERT * !!keep_pix_fmt |
+ OFILTER_FLAG_AUDIO_24BIT * !!(av_get_exact_bits_per_sample(ost->enc_ctx->codec_id) == 24),
};
snprintf(name, sizeof(name), "#%d:%d", mux->of.index, ost->index);