summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/hb-backend.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 791f3b678..68c43a816 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -4015,11 +4015,10 @@ ghb_validate_audio(GhbValue *settings, GtkWindow *parent)
if (codec == HB_ACODEC_AUTO_PASS)
continue;
- aconfig = (hb_audio_config_t *) hb_list_audio_config_item(
- title->list_audio, track );
- if ( ghb_audio_is_passthru(codec) &&
+ aconfig = hb_list_audio_config_item(title->list_audio, track);
+ if (ghb_audio_is_passthru(codec) &&
!(ghb_audio_can_passthru(aconfig->in.codec) &&
- (aconfig->in.codec & codec)))
+ (aconfig->in.codec & codec)))
{
// Not supported. AC3 is passthrough only, so input must be AC3
message = g_strdup_printf(
@@ -4103,6 +4102,14 @@ ghb_validate_audio(GhbValue *settings, GtkWindow *parent)
ghb_dict_set_string(asettings, "AudioMixdown",
hb_mixdown_get_short_name(amixdown));
}
+ int samplerate = ghb_settings_audio_samplerate_rate(asettings,
+ "AudioSamplerate");
+ if (samplerate == 0)
+ {
+ samplerate = aconfig->in.samplerate;
+ ghb_dict_set_string(asettings, "AudioSamplerate",
+ ghb_audio_samplerate_get_short_name(samplerate));
+ }
}
return TRUE;
}