changeset 8101:1bce6e325946

MACE fix
author arpi
date Mon, 04 Nov 2002 18:46:53 +0000
parents fd0da9a7d2e3
children 2759150cc687
files libmpcodecs/ad_ffmpeg.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c	Mon Nov 04 16:42:17 2002 +0000
+++ b/libmpcodecs/ad_ffmpeg.c	Mon Nov 04 18:46:53 2002 +0000
@@ -82,6 +82,18 @@
         return 0;
     }
    mp_msg(MSGT_DECAUDIO,MSGL_V,"INFO: libavcodec init OK!\n");
+   
+//   printf("\nFOURCC: 0x%X\n",sh_audio->format);
+   if(sh_audio->format==0x3343414D){
+       // MACE 3:1
+       sh_audio->ds->ss_div = 2*3; // 1 samples/packet
+       sh_audio->ds->ss_mul = 2*1; // 1 bytes/packet
+   } else
+   if(sh_audio->format==0x3643414D){
+       // MACE 6:1
+       sh_audio->ds->ss_div = 2*6; // 1 samples/packet
+       sh_audio->ds->ss_mul = 2*1; // 1 bytes/packet
+   }
 
    // Decode at least 1 byte:  (to get header filled)
    x=decode_audio(sh_audio,sh_audio->a_buffer,1,sh_audio->a_buffer_size);