diff options
author | John Stebbins <[email protected]> | 2019-02-13 10:00:12 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-02-13 12:05:06 -0700 |
commit | 9c609c89185a1c3c5d9e6f8d3c7e69303e3c2025 (patch) | |
tree | dc4bd049823f7cd188776d5ed3654927c5e8dbf6 | |
parent | e44f35b6785670c88e8bbec94bb28b40a8928f26 (diff) |
CLI: interpret --all-audio as implicit list of all tracks
--all-audio was setting up the preset to apply each audio encoder in the
preset to each source track. And it was adding new entries in the presets
audio encoder list for any audio command line overrides. This results in very
unintuitive behavior.
(cherry picked from commit e1e0e211759ce1413252b168d2d01479fed9f579)
-rw-r--r-- | test/test.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test.c b/test/test.c index cf01f4a2a..4b3063c46 100644 --- a/test/test.c +++ b/test/test.c @@ -3536,7 +3536,7 @@ static hb_dict_t * PreparePreset(const char *preset_name) } // Audio overrides - if (atracks == NULL && ( + if (atracks == NULL && audio_all != 1 && ( acodecs != NULL || abitrates != NULL || arates != NULL || @@ -3551,6 +3551,8 @@ static hb_dict_t * PreparePreset(const char *preset_name) { // No explicit audio tracks, but track settings modified. // Modify the presets audio settings. + // + // Note that --all-audio is explicitely asking for all tracks hb_value_array_t *list; list = hb_dict_get(preset, "AudioList"); if (list == NULL) @@ -4453,11 +4455,12 @@ PrepareJob(hb_handle_t *h, hb_title_t *title, hb_dict_t *preset_dict) hb_dict_t *audio_dict; /* Grab audio tracks */ - if (atracks != NULL) + if (atracks != NULL || audio_all == 1) { int track_count; int ii; - if (atracks[0] != NULL && strcasecmp("none", atracks[0])) + if (atracks != NULL && atracks[0] != NULL && + strcasecmp("none", atracks[0])) { // First "track" is not "none", add tracks for (ii = 0; atracks[ii] != NULL; ii++) |