diff options
author | Damiano Galassi <[email protected]> | 2017-04-14 18:38:45 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2017-04-14 18:38:45 +0200 |
commit | 568aa3826cd15afc375c2f8ba3d9649dfcecaddc (patch) | |
tree | 463899ae16031c1b704529246672750e0f5dcf34 /libhb/preset.c | |
parent | 5dd46e3d4b9029e33a353b9962fea3b8c3c399e4 (diff) |
preset: fix audio settings when samplerate == auto
Diffstat (limited to 'libhb/preset.c')
-rw-r--r-- | libhb/preset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libhb/preset.c b/libhb/preset.c index 05efa6a65..5741362fc 100644 --- a/libhb/preset.c +++ b/libhb/preset.c @@ -700,6 +700,10 @@ static void add_audio_for_lang(hb_value_array_t *list, const hb_dict_t *preset, sr_name = hb_dict_get_string(encoder_dict, "AudioSamplerate"); sr = hb_audio_samplerate_get_from_name(sr_name); + if (sr < 0) + { + sr = 0; + } hb_dict_set(audio_dict, "Samplerate", hb_value_int(sr)); } if (hb_dict_get(encoder_dict, "AudioCompressionLevel") != NULL) |