Mercurial > mplayer.hg
comparison libmpdemux/demux_mkv.c @ 14843:bbb693d3b130
Fix the ogg fourcc nightmare!!!
The problem: once upon a time, windows idiots decided to try to store
vorbis-in-ogg-in-avi. Of course this failed miserably, but they used
the audio format tag 0xfffe for "extended" to do this. Later someone
working on MPlayer somehow decided 0xfffe was the format for vorbis,
which is nonsense, and now that's conflicting with real wav files with
extended audio format. This patch changes demux_ogg (and mkv) to use
sane fourcc's for vorbis and theora and gets rid of the 0xfffe
nonsense so hopefully wav files with extended audio will work now.
If there are problems, we'll have to find workarounds...and drive an
18-wheeler full of cola thru the house of whoever wrote this 0xfffe
nonsense in MPlayer to begin with...
author | rfelker |
---|---|
date | Sun, 27 Feb 2005 18:11:17 +0000 |
parents | a226d301eec1 |
children | 898f68adad2b |
comparison
equal
deleted
inserted
replaced
14842:31ab04004943 | 14843:bbb693d3b130 |
---|---|
1821 track->headers[2] = &c[offset + track->header_sizes[0] + | 1821 track->headers[2] = &c[offset + track->header_sizes[0] + |
1822 track->header_sizes[1]]; | 1822 track->header_sizes[1]]; |
1823 track->header_sizes[2] = track->private_size - offset | 1823 track->header_sizes[2] = track->private_size - offset |
1824 - track->header_sizes[0] - track->header_sizes[1]; | 1824 - track->header_sizes[0] - track->header_sizes[1]; |
1825 | 1825 |
1826 track->a_formattag = 0xFFFE; | 1826 track->a_formattag = mmioFOURCC('v', 'r', 'b', 's'); |
1827 } | 1827 } |
1828 else if (!strcmp(track->codec_id, MKV_A_QDMC)) | 1828 else if (!strcmp(track->codec_id, MKV_A_QDMC)) |
1829 track->a_formattag = mmioFOURCC('Q', 'D', 'M', 'C'); | 1829 track->a_formattag = mmioFOURCC('Q', 'D', 'M', 'C'); |
1830 else if (!strcmp(track->codec_id, MKV_A_QDMC2)) | 1830 else if (!strcmp(track->codec_id, MKV_A_QDMC2)) |
1831 track->a_formattag = mmioFOURCC('Q', 'D', 'M', '2'); | 1831 track->a_formattag = mmioFOURCC('Q', 'D', 'M', '2'); |
1950 { | 1950 { |
1951 sh_a->codecdata_len = 2; | 1951 sh_a->codecdata_len = 2; |
1952 track->default_duration = 1024.0 / (float)sh_a->samplerate; | 1952 track->default_duration = 1024.0 / (float)sh_a->samplerate; |
1953 } | 1953 } |
1954 } | 1954 } |
1955 else if (track->a_formattag == 0xFFFE) /* VORBIS */ | 1955 else if (track->a_formattag == mmioFOURCC('v', 'r', 'b', 's')) /* VORBIS */ |
1956 { | 1956 { |
1957 for (i=0; i < 3; i++) | 1957 for (i=0; i < 3; i++) |
1958 { | 1958 { |
1959 dp = new_demux_packet (track->header_sizes[i]); | 1959 dp = new_demux_packet (track->header_sizes[i]); |
1960 memcpy (dp->buffer,track->headers[i],track->header_sizes[i]); | 1960 memcpy (dp->buffer,track->headers[i],track->header_sizes[i]); |