Skip to content

Commit

Permalink
AviSynth audio: always set input channel order
Browse files Browse the repository at this point in the history
  • Loading branch information
Asd-g committed May 23, 2024
1 parent 2689e4a commit d652386
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions AviSynth/audio_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@ void as_setup_audio_rendering
)
{
/* Channel layout. */
if (ctx->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC)
av_channel_layout_default(&ctx->ch_layout, ctx->ch_layout.nb_channels);
if ( channel_layout != 0 )
av_channel_layout_from_string(&aohp->output_channel_layout, channel_layout );
else
{
av_channel_layout_copy(&aohp->output_channel_layout, &ctx->ch_layout);
if (aohp->output_channel_layout.order == AV_CHANNEL_ORDER_UNSPEC)
av_channel_layout_default(&aohp->output_channel_layout, aohp->output_channel_layout.nb_channels);
}
/* Sample rate. */
if( sample_rate > 0 )
aohp->output_sample_rate = sample_rate;
Expand Down

0 comments on commit d652386

Please sign in to comment.