From d03ffb0aa349145ebea8bf314f94f55f3f1ba370 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Sun, 29 Jan 2017 10:21:02 -0700 Subject: preset: fix behavior of AudioSecondaryEncoderMode When true, this is meant to use the secondary encoder only for the first selected audio track. It was completely broken :( --- libhb/preset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libhb/preset.c b/libhb/preset.c index e07620f19..cef89d0a2 100644 --- a/libhb/preset.c +++ b/libhb/preset.c @@ -615,13 +615,13 @@ static void add_audio_for_lang(hb_value_array_t *list, const hb_dict_t *preset, hb_value_array_t * encoder_list = hb_dict_get(preset, "AudioList"); int count = hb_value_array_len(encoder_list); int track = find_audio_track(title, lang, 0, behavior); - int current_mode = 0; while (track >= 0) { + int track_count = hb_value_array_len(list); char key[8]; snprintf(key, sizeof(key), "%d", track); - count = current_mode ? 1 : count; + count = mode && track_count ? 1 : count; int ii; for (ii = 0; ii < count; ii++) { -- cgit v1.2.3