diff options
author | wm4 <wm4@nowhere> | 2013-05-12 21:47:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-12 21:47:55 +0200 |
commit | e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2 (patch) | |
tree | 08b54ef9bb771434fc7fbe9185793503d3ba314c /stream | |
parent | 6a83ef1552de4a1a71da49e45647ce1a4ce64e53 (diff) | |
parent | 48f94311516dc1426644b3e68b2a48c22727e1e7 (diff) | |
download | mpv-e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2.tar.bz2 mpv-e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2.tar.xz |
Merge branch 'audio_changes'
Conflicts:
audio/out/ao_lavc.c
Diffstat (limited to 'stream')
-rw-r--r-- | stream/tv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/stream/tv.c b/stream/tv.c index 80dd53e6a1..38368d4925 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -792,23 +792,25 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer) &sh_audio->samplerate); funcs->control(tvh->priv, TVI_CONTROL_AUD_GET_SAMPLESIZE, &sh_audio->samplesize); + int nchannels = sh_audio->channels.num; funcs->control(tvh->priv, TVI_CONTROL_AUD_GET_CHANNELS, - &sh_audio->channels); + &nchannels); + mp_chmap_from_channels(&sh_audio->channels, nchannels); sh_audio->gsh->codec = "mp-pcm"; sh_audio->format = audio_format; sh_audio->i_bps = sh_audio->o_bps = sh_audio->samplerate * sh_audio->samplesize * - sh_audio->channels; + sh_audio->channels.num; // emulate WF for win32 codecs: sh_audio->wf = malloc(sizeof(*sh_audio->wf)); sh_audio->wf->wFormatTag = sh_audio->format; - sh_audio->wf->nChannels = sh_audio->channels; + sh_audio->wf->nChannels = sh_audio->channels.num; sh_audio->wf->wBitsPerSample = sh_audio->samplesize * 8; sh_audio->wf->nSamplesPerSec = sh_audio->samplerate; - sh_audio->wf->nBlockAlign = sh_audio->samplesize * sh_audio->channels; + sh_audio->wf->nBlockAlign = sh_audio->samplesize * sh_audio->channels.num; sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps; mp_tmsg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n", |