mirror of
https://github.com/mpv-player/mpv
synced 2025-02-23 08:26:56 +00:00
Support for MP2 audio.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11156 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a3f0c559e9
commit
6331cb6f38
@ -784,7 +784,8 @@ static int check_track_information(mkv_demuxer_t *d) {
|
||||
t->a_formattag = get_uint16(&wfe->wFormatTag);
|
||||
}
|
||||
} else {
|
||||
if (!strcmp(t->codec_id, MKV_A_MP3))
|
||||
if (!strcmp(t->codec_id, MKV_A_MP3) ||
|
||||
!strcmp(t->codec_id, MKV_A_MP2))
|
||||
t->a_formattag = 0x0055;
|
||||
else if (!strncmp(t->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
|
||||
t->a_formattag = 0x2000;
|
||||
@ -1836,7 +1837,8 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) {
|
||||
sh_a->samplerate = (uint32_t)track->a_sfreq;
|
||||
sh_a->wf->nSamplesPerSec = (uint32_t)track->a_sfreq;
|
||||
sh_a->samplesize = track->a_bps / 8;
|
||||
if (!strcmp(track->codec_id, MKV_A_MP3)) {
|
||||
if (!strcmp(track->codec_id, MKV_A_MP3) ||
|
||||
!strcmp(track->codec_id, MKV_A_MP2)) {
|
||||
sh_a->wf->nAvgBytesPerSec = 16000;
|
||||
sh_a->wf->nBlockAlign = 1152;
|
||||
sh_a->wf->wBitsPerSample = 0;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#define MKV_A_AAC_4SBR "A_AAC/MPEG4/SBR"
|
||||
#define MKV_A_AC3 "A_AC3"
|
||||
#define MKV_A_DTS "A_DTS"
|
||||
#define MKV_A_MP2 "A_MPEG/L2"
|
||||
#define MKV_A_MP3 "A_MPEG/L3"
|
||||
#define MKV_A_PCM "A_PCM/INT/LIT"
|
||||
#define MKV_A_PCM_BE "A_PCM/INT/BIG"
|
||||
|
Loading…
Reference in New Issue
Block a user