Mercurial > mplayer.hg
comparison libmpcodecs/ad_liba52.c @ 10978:3eed882edb42
reversing my brokeness, but imho dnet is still broken on BE systems
author | alex |
---|---|
date | Thu, 02 Oct 2003 14:13:52 +0000 |
parents | d4d1aa31a1bd |
children | 67b8d64af8c7 |
comparison
equal
deleted
inserted
replaced
10977:3da6b1de1c33 | 10978:3eed882edb42 |
---|---|
46 while(sh_audio->a_in_buffer_len<8){ | 46 while(sh_audio->a_in_buffer_len<8){ |
47 int c=demux_getc(sh_audio->ds); | 47 int c=demux_getc(sh_audio->ds); |
48 if(c<0) return -1; /* EOF*/ | 48 if(c<0) return -1; /* EOF*/ |
49 sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c; | 49 sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c; |
50 } | 50 } |
51 #ifndef WORDS_BIGENDIAN | |
52 if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8); | 51 if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8); |
53 #endif | |
54 length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); | 52 length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); |
55 if(length>=7 && length<=3840) break; /* we're done.*/ | 53 if(length>=7 && length<=3840) break; /* we're done.*/ |
56 /* bad file => resync*/ | 54 /* bad file => resync*/ |
57 if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8); | 55 if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8); |
58 memcpy(sh_audio->a_in_buffer,sh_audio->a_in_buffer+1,7); | 56 memcpy(sh_audio->a_in_buffer,sh_audio->a_in_buffer+1,7); |