summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-08-20 00:49:45 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-08-20 00:49:45 +0000
commiteb9cf50a74aa44827e790d8de59be4359548821c (patch)
treeca502d8c6efa0ec989109bd604b4659b939fff1a /libavformat/matroskadec.c
parentb49d17b77ae499fb19a666672873ed9b2f07519e (diff)
matroska: add support for most variants of PCM
Originally committed as revision 14862 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index e7819f9f32..4f8bbbe2e2 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1162,6 +1162,20 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
&& (track->codec_priv.data != NULL)) {
track->video.fourcc = AV_RL32(track->codec_priv.data);
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) {
int profile = matroska_aac_profile(track->codec_id);
int sri = matroska_aac_sri(track->audio.samplerate);