summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-01-29 10:21:02 -0700
committerJohn Stebbins <[email protected]>2017-01-29 10:22:32 -0700
commitd03ffb0aa349145ebea8bf314f94f55f3f1ba370 (patch)
tree5ce4f2faa8ab6d75508c90d0cc2389a39b78653a /libhb
parent4329a3d714fae7167c9bb6e7d810174822a257e3 (diff)
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 :(
Diffstat (limited to 'libhb')
-rw-r--r--libhb/preset.c4
1 files 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++)
{