[MPlayer-cvslog] r33028 - in trunk: etc/codecs.conf libmpcodecs/ad_liba52.c

reimar subversion at mplayerhq.hu
Sat Mar 5 13:24:33 CET 2011


Author: reimar
Date: Sat Mar  5 13:24:33 2011
New Revision: 33028

Log:
Fix -ac a52 to work with codecs with tags other than 0x2000 or dnet
which were previously incorrectly byte-swapped.

Modified:
   trunk/etc/codecs.conf
   trunk/libmpcodecs/ad_liba52.c

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Sat Mar  5 13:09:25 2011	(r33027)
+++ trunk/etc/codecs.conf	Sat Mar  5 13:24:33 2011	(r33028)
@@ -4522,8 +4522,11 @@ audiocodec a52
   info "AC3-liba52"
   status working
   format 0x2000
-  ; format 0x332D6361 ; ac-3 in mp4  -- not working
+  format 0x332D6361 ; ac-3 in mp4
+  format 0x332D4341
+  format 0x20736D ;  "ms\20" older ac3 fcc (MOV files)
   fourcc dnet
+  fourcc sac3
   driver liba52
   dll "liba52"
 

Modified: trunk/libmpcodecs/ad_liba52.c
==============================================================================
--- trunk/libmpcodecs/ad_liba52.c	Sat Mar  5 13:09:25 2011	(r33027)
+++ trunk/libmpcodecs/ad_liba52.c	Sat Mar  5 13:24:33 2011	(r33028)
@@ -83,11 +83,11 @@ while(1){
 	if(c<0) return -1; /* EOF*/
         sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c;
     }
-    if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
+    if(sh_audio->format==MKTAG('d','n','e','t')) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
     length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
     if(length>=7 && length<=3840) break; /* we're done.*/
     /* bad file => resync*/
-    if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
+    if(sh_audio->format==MKTAG('d','n','e','t')) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
     memmove(sh_audio->a_in_buffer,sh_audio->a_in_buffer+1,7);
     --sh_audio->a_in_buffer_len;
 }
@@ -96,7 +96,7 @@ while(1){
     sh_audio->i_bps=bit_rate/8;
     sh_audio->samplesize=sh_audio->sample_format==AF_FORMAT_FLOAT_NE ? 4 : 2;
     demux_read_data(sh_audio->ds,sh_audio->a_in_buffer+8,length-8);
-    if(sh_audio->format!=0x2000)
+    if(sh_audio->format==MKTAG('d','n','e','t'))
 	swab(sh_audio->a_in_buffer+8,sh_audio->a_in_buffer+8,length-8);
 
 #ifdef CONFIG_LIBA52_INTERNAL


More information about the MPlayer-cvslog mailing list