summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ad_dmo.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-10-31 07:26:40 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:18:07 +0200
commit4de0369e8d6d8d497b3aa61044a152ae91d477a6 (patch)
treec723c2a64dcba73a21af87ea7ad25cf8026b279f /libmpcodecs/ad_dmo.c
parent45e1333581d9409b2d2be22129f8f6365016b609 (diff)
downloadmpv-4de0369e8d6d8d497b3aa61044a152ae91d477a6.tar.bz2
mpv-4de0369e8d6d8d497b3aa61044a152ae91d477a6.tar.xz
options: move audio_output_channels, audio_output_format to struct
Diffstat (limited to 'libmpcodecs/ad_dmo.c')
-rw-r--r--libmpcodecs/ad_dmo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmpcodecs/ad_dmo.c b/libmpcodecs/ad_dmo.c
index 1501c21078..714651a7e4 100644
--- a/libmpcodecs/ad_dmo.c
+++ b/libmpcodecs/ad_dmo.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include "config.h"
+#include "options.h"
#include "mp_msg.h"
#include "ad_internal.h"
@@ -46,9 +47,10 @@ static int init(sh_audio_t *sh)
static int preinit(sh_audio_t *sh_audio)
{
+ struct MPOpts *opts = sh_audio->opts;
DMO_AudioDecoder* ds_adec;
- int chans=(audio_output_channels==sh_audio->wf->nChannels) ?
- audio_output_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1);
+ int chans=(opts->audio_output_channels==sh_audio->wf->nChannels) ?
+ opts->audio_output_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1);
if(!(ds_adec=DMO_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf,chans)))
{
mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh_audio->codec->dll);