1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

hwac3 fix

bugrep & testing by Stefan Baehre <ste.ba@gmx.de>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9266 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2003-02-03 23:30:27 +00:00
parent f056b532e8
commit 0adfd9ae76

View File

@ -97,6 +97,7 @@ static int init(int rate,int channels,int format,int flags){
case AFMT_S16_LE: case AFMT_S16_LE:
case AFMT_S16_BE: case AFMT_S16_BE:
case AFMT_MPEG: case AFMT_MPEG:
case AFMT_AC3:
ao_data.format=format; ao_data.format=format;
break; break;
default: default:
@ -178,7 +179,7 @@ static int play(void* data,int len,int flags){
unsigned short *s=data; unsigned short *s=data;
// if(len>2000) len=2000; // if(len>2000) len=2000;
// printf("ao_mpegpes: len=%d \n",len); // printf("ao_mpegpes: len=%d \n",len);
if(ao_data.format==AFMT_S16_LE) if(ao_data.format==AFMT_S16_LE || ao_data.format==AFMT_AC3)
for(i=0;i<len/2;i++) s[i]=(s[i]>>8)|(s[i]<<8); // le<->be for(i=0;i<len/2;i++) s[i]=(s[i]>>8)|(s[i]<<8); // le<->be
send_lpcm_packet(data,len,0xA0,ao_data.pts,freq_id); send_lpcm_packet(data,len,0xA0,ao_data.pts,freq_id);
} }