mirror of
https://github.com/mpv-player/mpv
synced 2025-01-31 12:11:52 +00:00
Fix alac from QTpro (in standard mov file, not in m4a file)
Extradata is in a different place fixes samples/A-codecs/lossless/ALAC/alac.mov git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15023 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a1ee80fd2c
commit
af9950cd99
@ -950,8 +950,19 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
|
||||
int fcc=char2int(trak->stdata,48);
|
||||
// we have extra audio headers!!!
|
||||
printf("Audio extra header: len=%d fcc=0x%X\n",len,fcc);
|
||||
if((len >= 4) &&
|
||||
(char2int(trak->stdata,52) >= 12) &&
|
||||
(char2int(trak->stdata,52+4) == MOV_FOURCC('f','r','m','a')) &&
|
||||
(char2int(trak->stdata,52+8) == MOV_FOURCC('a','l','a','c')) &&
|
||||
(len >= 36 + char2int(trak->stdata,52))) {
|
||||
sh->codecdata_len = char2int(trak->stdata,52+char2int(trak->stdata,52));
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found alac atom (%d)!\n", sh->codecdata_len);
|
||||
sh->codecdata = (unsigned char *)malloc(sh->codecdata_len);
|
||||
memcpy(sh->codecdata, &trak->stdata[52+char2int(trak->stdata,52)], sh->codecdata_len);
|
||||
} else {
|
||||
sh->codecdata_len = len-8;
|
||||
sh->codecdata = trak->stdata+44+8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user