diff options
author | jstebbins <[email protected]> | 2009-04-28 21:49:18 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-04-28 21:49:18 +0000 |
commit | 062bdda5677651a1e844dadb2eb3fb9761e40541 (patch) | |
tree | aefcd436c9c871dd04dfbfaf061ef10ae17cf4c1 /gtk/src/audiohandler.c | |
parent | bea518d6b661d28e5df979ce8e27311fd76ccb2a (diff) |
LinGui: add "auto" passthru audio option
This selects the "best" ac3 *or* dts track for passthru
i got tired of my encodes ending up with stereo ac3 instead of 6ch dts
because I forgot to verify the audio before starting an encode
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2358 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r-- | gtk/src/audiohandler.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index adfc79b07..e2fa7f597 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -135,7 +135,8 @@ ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud) if (ghb_get_audio_info (&ainfo, titleindex, track) && ghb_audio_is_passthru (acodec_code)) { - if (ainfo.codec != acodec_code) + // HB_ACODEC_* are bit fields. Treat acodec_code as mask + if (!(ainfo.codec & acodec_code)) { acodec_code = ghb_get_default_acodec(); // If there's more audio to process, or we've already @@ -146,6 +147,10 @@ ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud) acodec_code = 0; } } + else + { + acodec_code &= ainfo.codec; + } } if (titleindex >= 0 && track < 0) acodec_code = 0; |