mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 03:02:53 +00:00
alac support via lavc decoder
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14923 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
234edad908
commit
d13d95f551
@ -2166,6 +2166,13 @@ audiocodec ffflac
|
||||
driver ffmpeg
|
||||
dll "flac"
|
||||
|
||||
audiocodec ffalac
|
||||
info "FFmpeg ALAC audio decoder"
|
||||
status working
|
||||
fourcc alac
|
||||
driver ffmpeg
|
||||
dll "alac"
|
||||
|
||||
audiocodec pcm
|
||||
info "Uncompressed PCM"
|
||||
status working
|
||||
|
@ -66,6 +66,7 @@ static int init(sh_audio_t *sh_audio)
|
||||
lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec;
|
||||
lavc_context->bit_rate = sh_audio->wf->nAvgBytesPerSec * 8;
|
||||
lavc_context->block_align = sh_audio->wf->nBlockAlign;
|
||||
lavc_context->bits_per_sample = sh_audio->wf->wBitsPerSample;
|
||||
}
|
||||
lavc_context->codec_tag = sh_audio->format; //FOURCC
|
||||
lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
|
||||
|
@ -988,6 +988,15 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
|
||||
#endif
|
||||
}
|
||||
} break;
|
||||
case MOV_FOURCC('a','l','a','c'): {
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found alac atom (%d)!\n", atom_len);
|
||||
if(atom_len > 8) {
|
||||
// copy all the atom (not only payload) for lavc alac decoder
|
||||
sh->codecdata_len = atom_len;
|
||||
sh->codecdata = (unsigned char *)malloc(sh->codecdata_len);
|
||||
memcpy(sh->codecdata, &trak->stdata[28], sh->codecdata_len);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unknown audio atom %c%c%c%c (%d)!\n",
|
||||
trak->stdata[32+adjust],trak->stdata[33+adjust],trak->stdata[34+adjust],trak->stdata[35+adjust],
|
||||
|
Loading…
Reference in New Issue
Block a user