demux_avi: Add WAVEFORMATEXTENSIBLE support

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32639 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-11-21 12:25:44 +00:00 committed by Uoti Urpala
parent 9ffc22923e
commit 5e6c4de69e
2 changed files with 3 additions and 1 deletions

View File

@ -331,6 +331,8 @@ while(1){
sh_audio->wf=realloc(sh_audio->wf, sizeof(*sh_audio->wf)+sh_audio->wf->cbSize);
}
sh_audio->format=sh_audio->wf->wFormatTag;
if (sh_audio->wf->wFormatTag == 0xfffe && sh_audio->wf->cbSize >= 22)
sh_audio->format = le2me_16(((WAVEFORMATEXTENSIBLE *)sh_audio->wf)->SubFormat);
if (sh_audio->format == 1 &&
last_fccHandler == mmioFOURCC('A', 'x', 'a', 'n'))
sh_audio->format = last_fccHandler;

View File

@ -415,7 +415,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
stream_read(s,(char*)(w + 1),w->cbSize);
l -= w->cbSize;
if (w->wFormatTag == 0xfffe && w->cbSize >= 22)
sh_audio->format = av_le2ne16(((WAVEFORMATEXTENSIBLE *)w)->SubFormat);
sh_audio->format = le2me_16(((WAVEFORMATEXTENSIBLE *)w)->SubFormat);
}
if( mp_msg_test(MSGT_DEMUX,MSGL_V) ) print_wave_header(w, MSGL_V);