summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-18 01:40:20 +0200
committerwm4 <wm4@nowhere>2014-06-18 01:58:05 +0200
commitc048b5db02333ad198ac1bd9ca793b31efdaff1f (patch)
treeacd4a4244b4d1c4d38005b9276d14068b831574e /player
parentc48dd85821445d701caa02d2b619294e4982d62b (diff)
downloadmpv-c048b5db02333ad198ac1bd9ca793b31efdaff1f.tar.bz2
mpv-c048b5db02333ad198ac1bd9ca793b31efdaff1f.tar.xz
options: allow adding multiple files with --audio-file
At least 1 person expected that this works this way.
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 43cb127e5a..bae8f74fe9 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -794,8 +794,10 @@ err_out:
static void open_audiofiles_from_options(struct MPContext *mpctx)
{
struct MPOpts *opts = mpctx->opts;
- open_external_file(mpctx, opts->audio_stream, opts->audio_demuxer_name,
- STREAM_AUDIO);
+ for (int n = 0; opts->audio_files && opts->audio_files[n]; n++) {
+ open_external_file(mpctx, opts->audio_files[n], opts->audio_demuxer_name,
+ STREAM_AUDIO);
+ }
}
struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename)