From 9c77f245dcb44f68ac5d7a7a632ec042d995c117 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 10 Nov 2016 11:43:03 -0800 Subject: LinGui: fix audio sanitizing after muxer change --- gtk/src/audiohandler.c | 11 +++-------- gtk/src/callbacks.c | 4 ++++ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'gtk/src') diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index c42ebdbfd..32228e5dc 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -273,13 +273,9 @@ ghb_select_audio_codec(gint mux, hb_audio_config_t *aconfig, gint acodec, gint f for (enc = hb_audio_encoder_get_next(NULL); enc != NULL; enc = hb_audio_encoder_get_next(enc)) { - if (enc->codec == fallback && - !(enc->muxers & mux)) + if (enc->codec == fallback && !(enc->muxers & mux)) { - if ( mux & HB_MUX_MASK_MKV ) - fallback = HB_ACODEC_LAME; - else - fallback = HB_ACODEC_FFAAC; + fallback = hb_audio_encoder_get_default(mux); break; } } @@ -291,8 +287,7 @@ ghb_select_audio_codec(gint mux, hb_audio_config_t *aconfig, gint acodec, gint f for (enc = hb_audio_encoder_get_next(NULL); enc != NULL; enc = hb_audio_encoder_get_next(enc)) { - if (enc->codec == acodec && - !(enc->muxers & mux)) + if (enc->codec == acodec && !(enc->muxers & mux)) { return fallback; } diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 092bb6435..29e576b2b 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1647,6 +1647,10 @@ container_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { g_debug("container_changed_cb ()"); ghb_widget_to_setting(ud->settings, widget); + const char * mux = ghb_dict_get_string(ud->settings, "FileFormat"); + GhbValue *dest_dict = ghb_get_job_dest_settings(ud->settings); + ghb_dict_set_string(dest_dict, "Mux", mux); + ghb_check_dependency(ud, widget, NULL); ghb_show_container_options(ud); update_acodec(ud); -- cgit v1.2.3