mirror of https://github.com/mpv-player/mpv
Support for FLAC in Matroska written in the MS compatibility mode.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11483 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b19f9a5bb7
commit
c36b3d52c0
|
@ -2355,7 +2355,8 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) {
|
||||||
|
|
||||||
track->realmedia = true;
|
track->realmedia = true;
|
||||||
|
|
||||||
} else if (!strcmp(track->codec_id, MKV_A_FLAC)) {
|
} else if (!strcmp(track->codec_id, MKV_A_FLAC) ||
|
||||||
|
(track->a_formattag == 0xf1ac)) {
|
||||||
free(sh_a->wf);
|
free(sh_a->wf);
|
||||||
sh_a->wf = NULL;
|
sh_a->wf = NULL;
|
||||||
|
|
||||||
|
@ -2364,8 +2365,16 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) {
|
||||||
dp->pts = 0;
|
dp->pts = 0;
|
||||||
dp->flags = 0;
|
dp->flags = 0;
|
||||||
ds_add_packet(demuxer->audio, dp);
|
ds_add_packet(demuxer->audio, dp);
|
||||||
dp = new_demux_packet(track->private_size);
|
if (track->a_formattag == mmioFOURCC('f', 'L', 'a', 'C')) {
|
||||||
memcpy(dp->buffer, track->private_data, track->private_size);
|
dp = new_demux_packet(track->private_size);
|
||||||
|
memcpy(dp->buffer, track->private_data, track->private_size);
|
||||||
|
} else {
|
||||||
|
sh_a->format = mmioFOURCC('f', 'L', 'a', 'C');
|
||||||
|
dp = new_demux_packet(track->private_size - sizeof(WAVEFORMATEX));
|
||||||
|
memcpy(dp->buffer, (unsigned char *)track->private_data +
|
||||||
|
sizeof(WAVEFORMATEX), track->private_size -
|
||||||
|
sizeof(WAVEFORMATEX));
|
||||||
|
}
|
||||||
dp->pts = 0;
|
dp->pts = 0;
|
||||||
dp->flags = 0;
|
dp->flags = 0;
|
||||||
ds_add_packet(demuxer->audio, dp);
|
ds_add_packet(demuxer->audio, dp);
|
||||||
|
|
Loading…
Reference in New Issue