[Mplayer-cvslog] CVS: main/libmpcodecs ad_imaadpcm.c,1.5,1.6

Alex Beregszaszi alex at mplayerhq.hu
Mon Nov 4 21:31:49 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv18297

Modified Files:
	ad_imaadpcm.c 
Log Message:
ms\0x00\x11 support

Index: ad_imaadpcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_imaadpcm.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ad_imaadpcm.c	30 Aug 2002 21:44:20 -0000	1.5
+++ ad_imaadpcm.c	4 Nov 2002 20:31:46 -0000	1.6
@@ -13,6 +13,7 @@
         0x61: DK4 ADPCM found in certain AVI files on Sega Saturn CD-ROMs;
               note that this is a 'rogue' format number in that it was
               never officially registered with Microsoft
+    0x1100736d: IMA ADPCM coded like in MS AVI/ASF/WAV found in QT files
 */
 
 #include <stdio.h>
@@ -86,7 +87,8 @@
   // if format is "ima4", assume the audio is coming from a QT file which
   // indicates constant block size, whereas an AVI/ASF/WAV file will fill
   // in this field with 0x11
-  if ((sh_audio->format == 0x11) || (sh_audio->format == 0x61))
+  if ((sh_audio->format == 0x11) || (sh_audio->format == 0x61) ||
+      (sh_audio->format == 0x1100736d))
   {
     sh_audio->ds->ss_div = (sh_audio->wf->nBlockAlign - 
       (MS_IMA_ADPCM_PREAMBLE_SIZE * sh_audio->wf->nChannels)) * 2;
@@ -352,7 +354,7 @@
     sh_audio->ds->ss_mul) 
     return -1;
 
-  if (sh_audio->format == 0x11)
+  if ((sh_audio->format == 0x11) || (sh_audio->format == 0x1100736d))
   {
     return 2 * ms_ima_adpcm_decode_block(
       (unsigned short*)buf, sh_audio->a_in_buffer, sh_audio->wf->nChannels,




More information about the MPlayer-cvslog mailing list