From cc8a878a9cb9688b2eb53b7ee3c6d82bc1555aaf Mon Sep 17 00:00:00 2001 From: tack Date: Mon, 22 Feb 2010 14:27:32 +0000 Subject: Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a wave file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30709 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_audio.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmpdemux/demux_audio.c') diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index 63b710427d..9c1c006003 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -416,6 +416,8 @@ static int demux_audio_open(demuxer_t* demuxer) { } stream_read(s,(char*)((char*)(w)+sizeof(WAVEFORMATEX)),w->cbSize); l -= w->cbSize; + if (w->wFormatTag & 0xfffe && w->cbSize >= 22) + sh_audio->format = ((WAVEFORMATEXTENSIBLE *)w)->SubFormat; } if( mp_msg_test(MSGT_DEMUX,MSGL_V) ) print_wave_header(w, MSGL_V); -- cgit v1.2.3