diff mp3.c @ 1433:dababce8f69e libavformat

dont set the sampling rate just because 1 mp3 packet header says so (fixes playback speed on some old mencoder generated avis which where then dumped to mp3)
author michael
date Mon, 30 Oct 2006 02:19:55 +0000
parents 3b00fb8ef8e4
children 5789e36270ce
line wrap: on
line diff
--- a/mp3.c	Sun Oct 29 11:53:07 2006 +0000
+++ b/mp3.c	Mon Oct 30 02:19:55 2006 +0000
@@ -247,7 +247,7 @@
 static int mp3_read_probe(AVProbeData *p)
 {
     int max_frames, first_frames;
-    int fsize, frames;
+    int fsize, frames, sample_rate;
     uint32_t header;
     uint8_t *buf, *buf2, *end;
     AVCodecContext avctx;
@@ -267,7 +267,7 @@
 
         for(frames = 0; buf2 < end; frames++) {
             header = (buf2[0] << 24) | (buf2[1] << 16) | (buf2[2] << 8) | buf2[3];
-            fsize = mpa_decode_header(&avctx, header);
+            fsize = mpa_decode_header(&avctx, header, &sample_rate);
             if(fsize < 0)
                 break;
             buf2 += fsize;