From 498c544ad20be3e5ebf9c481cc239958399fba12 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 30 Oct 2006 02:19:55 +0000 Subject: 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) Originally committed as revision 6837 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mp3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/mp3.c b/libavformat/mp3.c index 582e7e8547..0e39d25ba7 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -247,7 +247,7 @@ static void id3_create_tag(AVFormatContext *s, uint8_t *buf) 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 @@ static int mp3_read_probe(AVProbeData *p) 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; -- cgit v1.2.3