diff options
Diffstat (limited to 'libhb/stream.c')
-rw-r--r-- | libhb/stream.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index 9a287dc88..3e4a682e3 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -2041,19 +2041,17 @@ static void set_audio_description( sizeof( audio->config.lang.description ), "%s (%s)", audio->config.lang.simple, codec_name ); - if( audio->config.in.channel_layout == HB_INPUT_CH_LAYOUT_DOLBY ) + if (audio->config.in.channel_layout == AV_CH_LAYOUT_STEREO_DOWNMIX) { - strcat( audio->config.lang.description, " (Dolby Surround)" ); + strcat(audio->config.lang.description, " (Dolby Surround)"); } - else if( audio->config.in.channel_layout ) + else if (audio->config.in.channel_layout) { - int layout = audio->config.in.channel_layout; - char *desc = audio->config.lang.description + - strlen( audio->config.lang.description ); - sprintf( desc, " (%d.%d ch)", - HB_INPUT_CH_LAYOUT_GET_DISCRETE_FRONT_COUNT(layout) + - HB_INPUT_CH_LAYOUT_GET_DISCRETE_REAR_COUNT(layout), - HB_INPUT_CH_LAYOUT_GET_DISCRETE_LFE_COUNT(layout) ); + int lfe = !!(audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY); + int channels = av_get_channel_layout_nb_channels(audio->config.in.channel_layout); + char *desc = audio->config.lang.description + + strlen(audio->config.lang.description); + sprintf(desc, " (%d.%d ch)", channels - lfe, lfe); } } |