diff options
author | wm4 <wm4@nowhere> | 2018-01-29 06:08:52 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-30 03:10:27 -0800 |
commit | 054c02ad64a62dd8393bde0fd73edeaa71048722 (patch) | |
tree | 3feca6f347bec63e974fcea7536ae414c05a378d /audio/out | |
parent | 6d36fad83c779936a012e85a1eb92ec94651c7c0 (diff) | |
download | mpv-054c02ad64a62dd8393bde0fd73edeaa71048722.tar.bz2 mpv-054c02ad64a62dd8393bde0fd73edeaa71048722.tar.xz |
ao_null: add --ao-null-format option for debugging
Helpful especially to test spdif fallback and so on.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_null.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/out/ao_null.c b/audio/out/ao_null.c index 29d88d4670..3880ee8aa4 100644 --- a/audio/out/ao_null.c +++ b/audio/out/ao_null.c @@ -58,6 +58,7 @@ struct priv { int outburst; // samples struct m_channels channel_layouts; + int format; }; static void drain(struct ao *ao) @@ -88,6 +89,9 @@ static int init(struct ao *ao) { struct priv *priv = ao->priv; + if (priv->format) + ao->format = priv->format; + ao->untimed = priv->untimed; struct mp_chmap_sel sel = {.tmp = ao}; @@ -241,6 +245,7 @@ const struct ao_driver audio_out_null = { OPT_FLAG("broken-eof", broken_eof, 0), OPT_FLAG("broken-delay", broken_delay, 0), OPT_CHANNELS("channel-layouts", channel_layouts, 0), + OPT_AUDIOFORMAT("format", format, 0), {0} }, .options_prefix = "ao-null", |