changeset 32552:2e4da7887fd1

Add WAVEFORMATEXTENSIBLE support to AVI demuxer.
author reimar
date Sun, 21 Nov 2010 12:25:44 +0000
parents 72ee0026e441
children c44141d4e443
files libmpdemux/aviheader.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Sun Nov 21 12:25:01 2010 +0000
+++ b/libmpdemux/aviheader.c	Sun Nov 21 12:25:44 2010 +0000
@@ -332,6 +332,8 @@
 	    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 = av_le2ne16(((WAVEFORMATEXTENSIBLE *)sh_audio->wf)->SubFormat);
 	if (sh_audio->format == 1 &&
 	    last_fccHandler == mmioFOURCC('A', 'x', 'a', 'n'))
 	    sh_audio->format = last_fccHandler;