mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +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:
parent
f056b532e8
commit
0adfd9ae76
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user