diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2006-11-08 20:09:56 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2006-11-08 20:09:56 +0000 |
commit | 4647c0ec663be8e0960437381ca66cf7e7d1d8e1 (patch) | |
tree | c40c11c3576c2ea2af5c9b9369c5da67a134e42f /libavformat/matroska.c | |
parent | 0008afc59c240271827d8a0fc747179da905050f (diff) | |
download | ffmpeg-streaming-4647c0ec663be8e0960437381ca66cf7e7d1d8e1.zip ffmpeg-streaming-4647c0ec663be8e0960437381ca66cf7e7d1d8e1.tar.gz |
add audio output sampling freqency reading in matroska
Originally committed as revision 6946 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroska.c')
-rw-r--r-- | libavformat/matroska.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/matroska.c b/libavformat/matroska.c index e4763f3..4917388 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -110,6 +110,8 @@ /* IDs in the trackaudio master */ #define MATROSKA_ID_AUDIOSAMPLINGFREQ 0xB5 +#define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ 0x78B5 + #define MATROSKA_ID_AUDIOBITDEPTH 0x6264 #define MATROSKA_ID_AUDIOCHANNELS 0x9F @@ -273,6 +275,7 @@ typedef struct MatroskaAudioTrack { int channels, bitdepth, + internal_samplerate, samplerate; //.. } MatroskaAudioTrack; @@ -1433,6 +1436,16 @@ matroska_add_stream (MatroskaDemuxContext *matroska) if ((res = ebml_read_float(matroska, &id, &num)) < 0) break; + audiotrack->internal_samplerate = + audiotrack->samplerate = num; + break; + } + + case MATROSKA_ID_AUDIOOUTSAMPLINGFREQ: { + double num; + if ((res = ebml_read_float(matroska, &id, + &num)) < 0) + break; audiotrack->samplerate = num; break; } |