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