Index: libhb/work.c =================================================================== --- libhb/work.c (revision 1289) +++ libhb/work.c (working copy) @@ -397,6 +397,15 @@ int audioCodecsSupport6Ch = ((audio->codec == HB_ACODEC_AC3 || audio->codec == HB_ACODEC_DCA) && (job->acodec == HB_ACODEC_FAAC || job->acodec == HB_ACODEC_VORBIS)); + if( audio->codec != HB_ACODEC_AC3 && job->audio_mixdowns[i] == HB_AMIXDOWN_AC3 ) + { + /* + * Sanity check that we haven't asked for AC3 from a non AC3 track - drop this track + * to stereo to avoid a crash later. + */ + job->audio_mixdowns[i] = HB_AMIXDOWN_STEREO; + } + if( job->audio_mixdowns[i] != HB_AMIXDOWN_AC3 ) { /* find out what the format of our source audio is */ Index: macosx/Controller.mm =================================================================== --- macosx/Controller.mm (revision 1289) +++ macosx/Controller.mm (working copy) @@ -2929,7 +2929,7 @@ /* do we want to add a stereo option? */ /* offer stereo if we have a mono source and non-mono-supporting codecs, as otherwise we won't have a mixdown at all */ /* also offer stereo if we have a stereo-or-better source */ - if ((!mp4AacAc3 && ((layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || layout >= HB_INPUT_CH_LAYOUT_STEREO))) { + if (((!mp4AacAc3 || audio->codec == HB_ACODEC_MPGA || audio->codec == HB_ACODEC_LPCM || audio->codec == HB_ACODEC_DCA) && ((layout == HB_INPUT_CH_LAYOUT_MONO && audioCodecsSupportMono == 0) || layout >= HB_INPUT_CH_LAYOUT_STEREO))) { NSMenuItem *menuItem = [[mixdownPopUp menu] addItemWithTitle: [NSString stringWithCString: hb_audio_mixdowns[1].human_readable_name] action: NULL keyEquivalent: @""];