changeset 1467:24c082e20a6a libavformat

add audio output sampling freqency reading in matroska
author aurel
date Wed, 08 Nov 2006 20:09:56 +0000
parents 340d1fe645d3
children 3f467725b70f
files matroska.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Wed Nov 08 18:57:02 2006 +0000
+++ b/matroska.c	Wed Nov 08 20:09:56 2006 +0000
@@ -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 @@
 
     int channels,
         bitdepth,
+        internal_samplerate,
         samplerate;
     //..
 } MatroskaAudioTrack;
@@ -1433,6 +1436,16 @@
                             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;
                         }