History

fix 7.1 with PCE mapping (#79)

refs https://code.videolan.org/videolan/vlc/-/issues/27421

François Cartegnie committed 4 years ago

Commit b9bd2eb1 parent df42c6f1 file · +12 −6Browse files

Showing the changes to libfaad/decoder.c (1 of 1 file). Show all

Unified · Split

libfaad/decoder.c+12−6
@@ -615,24 +615,30 @@ static void create_channel_config(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *h · 614 unmodified lines
615615 if (hDecoder->pce_set)
616616 {
617617 uint8_t i, chpos = 0;
618− uint8_t chdir, back_center = 0;
618+ uint8_t chdir, back_center = 0, total = 0;
619619
620620 hInfo->num_front_channels = hDecoder->pce.num_front_channels;
621+ total += hInfo->num_front_channels;
621622 hInfo->num_side_channels = hDecoder->pce.num_side_channels;
623+ total += hInfo->num_side_channels;
622624 hInfo->num_back_channels = hDecoder->pce.num_back_channels;
625+ total += hInfo->num_back_channels;
623626 hInfo->num_lfe_channels = hDecoder->pce.num_lfe_channels;
627+ total += hInfo->num_lfe_channels;
624628
625629 chdir = hInfo->num_front_channels;
626630 if (chdir & 1)
627631 {
628632 #if (defined(PS_DEC) || defined(DRM_PS))
629− /* When PS is enabled output is always stereo */
630− hInfo->channel_position[chpos++] = FRONT_CHANNEL_LEFT;
631− hInfo->channel_position[chpos++] = FRONT_CHANNEL_RIGHT;
632−#else
633+ if( total == 1 )
634+ {
635+ /* When PS is enabled output is always stereo */
636+ hInfo->channel_position[chpos++] = FRONT_CHANNEL_LEFT;
637+ hInfo->channel_position[chpos++] = FRONT_CHANNEL_RIGHT;
638+ } else
639+#endif
633640 hInfo->channel_position[chpos++] = FRONT_CHANNEL_CENTER;
634641 chdir--;
635−#endif
636642 }
637643 for (i = 0; i < chdir; i += 2)
638644 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t