summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-30 02:19:55 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-30 02:19:55 +0000
commit498c544ad20be3e5ebf9c481cc239958399fba12 (patch)
tree286002226bf9acd609bf5a6ffecd33d19ac3362f /libavformat
parentc0d8052b501bb07ccc379f0967ffe9bb2c77e606 (diff)
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
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mp3.c4
1 files changed, 2 insertions, 2 deletions
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;