comparison libmpdemux/demux_mkv.cpp @ 11155:4a21e1672c91

Support for MP2 audio.
author mosu
date Thu, 16 Oct 2003 22:01:30 +0000
parents 0e9ea2a3a220
children b4040706e1d3
comparison
equal deleted inserted replaced
11154:0e9ea2a3a220 11155:4a21e1672c91
782 } 782 }
783 783
784 t->a_formattag = get_uint16(&wfe->wFormatTag); 784 t->a_formattag = get_uint16(&wfe->wFormatTag);
785 } 785 }
786 } else { 786 } else {
787 if (!strcmp(t->codec_id, MKV_A_MP3)) 787 if (!strcmp(t->codec_id, MKV_A_MP3) ||
788 !strcmp(t->codec_id, MKV_A_MP2))
788 t->a_formattag = 0x0055; 789 t->a_formattag = 0x0055;
789 else if (!strncmp(t->codec_id, MKV_A_AC3, strlen(MKV_A_AC3))) 790 else if (!strncmp(t->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
790 t->a_formattag = 0x2000; 791 t->a_formattag = 0x2000;
791 else if (!strcmp(t->codec_id, MKV_A_DTS)) 792 else if (!strcmp(t->codec_id, MKV_A_DTS))
792 // uses same format tag as AC3, only supported with -hwac3 793 // uses same format tag as AC3, only supported with -hwac3
1834 sh_a->channels = track->a_channels; 1835 sh_a->channels = track->a_channels;
1835 sh_a->wf->nChannels = track->a_channels; 1836 sh_a->wf->nChannels = track->a_channels;
1836 sh_a->samplerate = (uint32_t)track->a_sfreq; 1837 sh_a->samplerate = (uint32_t)track->a_sfreq;
1837 sh_a->wf->nSamplesPerSec = (uint32_t)track->a_sfreq; 1838 sh_a->wf->nSamplesPerSec = (uint32_t)track->a_sfreq;
1838 sh_a->samplesize = track->a_bps / 8; 1839 sh_a->samplesize = track->a_bps / 8;
1839 if (!strcmp(track->codec_id, MKV_A_MP3)) { 1840 if (!strcmp(track->codec_id, MKV_A_MP3) ||
1841 !strcmp(track->codec_id, MKV_A_MP2)) {
1840 sh_a->wf->nAvgBytesPerSec = 16000; 1842 sh_a->wf->nAvgBytesPerSec = 16000;
1841 sh_a->wf->nBlockAlign = 1152; 1843 sh_a->wf->nBlockAlign = 1152;
1842 sh_a->wf->wBitsPerSample = 0; 1844 sh_a->wf->wBitsPerSample = 0;
1843 sh_a->samplesize = 0; 1845 sh_a->samplesize = 0;
1844 1846