summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-03-05 12:24:33 +0000
committerUoti Urpala <uau@mplayer2.org>2011-04-13 03:15:05 +0300
commit55dbd183e343178e705124add8a7a9579c8e2a35 (patch)
tree90e542353dc9b9f138a142c5720e0bbf66e0a538
parent7a3fd839efe870575c94ffc856d625f78145a7f4 (diff)
downloadmpv-55dbd183e343178e705124add8a7a9579c8e2a35.tar.bz2
mpv-55dbd183e343178e705124add8a7a9579c8e2a35.tar.xz
ad_liba52: Fix -ac a52 with tags other than 0x2000 or dnet
Audio with all codec tags other than 0x2000 was byte-swapped, while only "dnet" should be. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33028 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--etc/codecs.conf5
-rw-r--r--libmpcodecs/ad_liba52.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 921b34771c..87d833b7a8 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -4459,8 +4459,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"
diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c
index 45126a0786..dd277fd20a 100644
--- a/libmpcodecs/ad_liba52.c
+++ b/libmpcodecs/ad_liba52.c
@@ -81,11 +81,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;
}
@@ -94,7 +94,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