diff options
Diffstat (limited to 'libhb/scan.c')
-rw-r--r-- | libhb/scan.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/libhb/scan.c b/libhb/scan.c index a93d3015a..45da1b7d1 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -506,11 +506,7 @@ static void LookForAC3AndDCA( hb_title_t * title, hb_buffer_t * b ) break; /* 3F/2R input */ case A52_3F2R: - if (flags & A52_LFE) { - audio->input_channel_layout = HB_INPUT_CH_LAYOUT_3F2RLFE; - } else { - audio->input_channel_layout = HB_INPUT_CH_LAYOUT_3F2R; - } + audio->input_channel_layout = HB_INPUT_CH_LAYOUT_3F2R; break; /* 3F/1R input */ case A52_3F1R: @@ -530,6 +526,12 @@ static void LookForAC3AndDCA( hb_title_t * title, hb_buffer_t * b ) default: audio->input_channel_layout = HB_INPUT_CH_LAYOUT_STEREO; } + + /* add in our own LFE flag if the source has LFE */ + if (flags & A52_LFE) + { + audio->input_channel_layout = audio->input_channel_layout | HB_INPUT_CH_LAYOUT_HAS_LFE; + } /* store the AC3 flags for future reference This enables us to find out if we had a stereo or Dolby source later on */ @@ -582,11 +584,7 @@ static void LookForAC3AndDCA( hb_title_t * title, hb_buffer_t * b ) break; /* 3F/2R input */ case DCA_3F2R: - if (flags & DCA_LFE) { - audio->input_channel_layout = HB_INPUT_CH_LAYOUT_3F2RLFE; - } else { - audio->input_channel_layout = HB_INPUT_CH_LAYOUT_3F2R; - } + audio->input_channel_layout = HB_INPUT_CH_LAYOUT_3F2R; break; /* 3F/1R input */ case DCA_3F1R: @@ -610,6 +608,12 @@ static void LookForAC3AndDCA( hb_title_t * title, hb_buffer_t * b ) audio->input_channel_layout = HB_INPUT_CH_LAYOUT_STEREO; } + /* add in our own LFE flag if the source has LFE */ + if (flags & DCA_LFE) + { + audio->input_channel_layout = audio->input_channel_layout | HB_INPUT_CH_LAYOUT_HAS_LFE; + } + /* store the DCA flags for future reference This enables us to find out if we had a stereo or Dolby source later on */ audio->config.dca.dcaflags = flags; |