Commit efb0d7a7 authored by aurel's avatar aurel

matroska: add support for most variants of PCM

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14862 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 37687226
...@@ -41,9 +41,15 @@ const CodecTags ff_mkv_codec_tags[]={ ...@@ -41,9 +41,15 @@ const CodecTags ff_mkv_codec_tags[]={
{"A_MPEG/L3" , CODEC_ID_MP3}, {"A_MPEG/L3" , CODEC_ID_MP3},
{"A_MPEG/L2" , CODEC_ID_MP2}, {"A_MPEG/L2" , CODEC_ID_MP2},
{"A_MPEG/L1" , CODEC_ID_MP2}, {"A_MPEG/L1" , CODEC_ID_MP2},
{"A_PCM/INT/BIG" , CODEC_ID_PCM_U16BE}, {"A_PCM/INT/BIG" , CODEC_ID_PCM_S16BE},
{"A_PCM/INT/LIT" , CODEC_ID_PCM_U16LE}, {"A_PCM/INT/BIG" , CODEC_ID_PCM_S24BE},
// {"A_PCM/FLOAT/IEEE" , CODEC_ID_NONE}, {"A_PCM/INT/BIG" , CODEC_ID_PCM_S32BE},
{"A_PCM/INT/LIT" , CODEC_ID_PCM_S16LE},
{"A_PCM/INT/LIT" , CODEC_ID_PCM_S24LE},
{"A_PCM/INT/LIT" , CODEC_ID_PCM_S32LE},
{"A_PCM/INT/LIT" , CODEC_ID_PCM_U8},
{"A_PCM/FLOAT/IEEE" , CODEC_ID_PCM_F32LE},
{"A_PCM/FLOAT/IEEE" , CODEC_ID_PCM_F64LE},
{"A_AC3" , CODEC_ID_AC3}, {"A_AC3" , CODEC_ID_AC3},
// {"A_EAC3" , CODEC_ID_EAC3}, // {"A_EAC3" , CODEC_ID_EAC3},
{"A_DTS" , CODEC_ID_DTS}, {"A_DTS" , CODEC_ID_DTS},
......
...@@ -1162,6 +1162,20 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1162,6 +1162,20 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
&& (track->codec_priv.data != NULL)) { && (track->codec_priv.data != NULL)) {
track->video.fourcc = AV_RL32(track->codec_priv.data); track->video.fourcc = AV_RL32(track->codec_priv.data);
codec_id=codec_get_id(codec_movvideo_tags, track->video.fourcc); codec_id=codec_get_id(codec_movvideo_tags, track->video.fourcc);
} else if (codec_id == CODEC_ID_PCM_S16BE) {
switch (track->audio.bitdepth) {
case 8: codec_id = CODEC_ID_PCM_U8; break;
case 24: codec_id = CODEC_ID_PCM_S24BE; break;
case 32: codec_id = CODEC_ID_PCM_S32BE; break;
}
} else if (codec_id == CODEC_ID_PCM_S16LE) {
switch (track->audio.bitdepth) {
case 8: codec_id = CODEC_ID_PCM_U8; break;
case 24: codec_id = CODEC_ID_PCM_S24LE; break;
case 32: codec_id = CODEC_ID_PCM_S32LE; break;
}
} else if (codec_id==CODEC_ID_PCM_F32LE && track->audio.bitdepth==64) {
codec_id = CODEC_ID_PCM_F64LE;
} else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) { } else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) {
int profile = matroska_aac_profile(track->codec_id); int profile = matroska_aac_profile(track->codec_id);
int sri = matroska_aac_sri(track->audio.samplerate); int sri = matroska_aac_sri(track->audio.samplerate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment