File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -925,7 +925,10 @@ void update_configuration
925
925
lsmash_audio_summary_t * audio = (lsmash_audio_summary_t * )summary ;
926
926
codecpar -> sample_rate = config -> queue .sample_rate ? config -> queue .sample_rate : audio -> frequency ;
927
927
codecpar -> bits_per_coded_sample = config -> queue .bits_per_sample ? config -> queue .bits_per_sample : audio -> sample_size ;
928
- av_channel_layout_default (& codecpar -> ch_layout , config -> queue .channels ? config -> queue .channels : audio -> channels );
928
+ if (config -> queue .channels )
929
+ av_channel_layout_default (& codecpar -> ch_layout , config -> queue .channels );
930
+ else if (codecpar -> ch_layout .order == AV_CHANNEL_ORDER_UNSPEC )
931
+ av_channel_layout_default (& codecpar -> ch_layout , audio -> channels );
929
932
}
930
933
if ( codec -> id == AV_CODEC_ID_DTS )
931
934
{
You can’t perform that action at this time.
0 commit comments