diff options
author | John Stebbins <[email protected]> | 2019-02-13 10:00:12 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-02-13 11:03:38 -0800 |
commit | e1e0e211759ce1413252b168d2d01479fed9f579 (patch) | |
tree | 40e4562527125982966c34a8de8af047234a1c56 /test/test.c | |
parent | 972aef5ea17869b7a36c48ffd54d68e1c6d975b5 (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.
Diffstat (limited to 'test/test.c')
-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 b6eabe5f5..e5a2f4927 100644 --- a/test/test.c +++ b/test/test.c @@ -3608,7 +3608,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 || @@ -3623,6 +3623,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) @@ -4564,11 +4566,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++) |