From 57048c7393e94820520a395e569d05cdcc085224 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 5 Jun 2015 22:35:43 +0200 Subject: audio: add --audio-spdif as new method for enabling passthrough This provides a new method for enabling spdif passthrough. The old method via --ad (--ad=spdif:ac3 etc.) is deprecated. The deprecated method will probably stop working at some point. This also supports PCM fallback. One caveat is that it will lose at least 1 audio packet in doing so. (I don't care enough to prevent this.) (This is named after the old S/PDIF connector, because it uses the same underlying technology as far as the higher level protoco is concerned. Also, the user should be renamed that passthrough is backwards.) --- player/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index bb22069bfc..06b1867ebe 100644 --- a/player/main.c +++ b/player/main.c @@ -278,6 +278,10 @@ static bool handle_help_options(struct MPContext *mpctx) talloc_free(list); opt_exit = 1; } + if (opts->audio_spdif && strcmp(opts->audio_spdif, "help") == 0) { + MP_INFO(mpctx, "Choices: ac3,dts-hd,dts (and possibly more)\n"); + opt_exit = 1; + } if (opts->video_decoders && strcmp(opts->video_decoders, "help") == 0) { struct mp_decoder_list *list = video_decoder_list(); mp_print_decoders(log, MSGL_INFO, "Video decoders:", list); -- cgit v1.2.3