fftools/ffmpeg_filter: stop setting encoder channel layout unnecessarily

The channel layout is set before opening the encoder, in enc_open().
Messing with it in configure_output_audio_filter() cannot accomplish
anything meaningful.
pull/389/head
Anton Khirnov 2 years ago
parent 2f24290c8e
commit 5297250920
  1. 4
      fftools/ffmpeg_filter.c

@ -699,7 +699,6 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
{ {
OutputStream *ost = ofilter->ost; OutputStream *ost = ofilter->ost;
OutputFile *of = output_files[ost->file_index]; OutputFile *of = output_files[ost->file_index];
AVCodecContext *codec = ost->enc_ctx;
AVFilterContext *last_filter = out->filter_ctx; AVFilterContext *last_filter = out->filter_ctx;
int pad_idx = out->pad_idx; int pad_idx = out->pad_idx;
AVBPrint args; AVBPrint args;
@ -750,9 +749,6 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
} }
#endif #endif
if (codec->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC)
av_channel_layout_default(&codec->ch_layout, codec->ch_layout.nb_channels);
choose_sample_fmts(ofilter, &args); choose_sample_fmts(ofilter, &args);
choose_sample_rates(ofilter, &args); choose_sample_rates(ofilter, &args);
choose_channel_layouts(ofilter, &args); choose_channel_layouts(ofilter, &args);

Loading…
Cancel
Save