Mercurial > libavformat.hg
changeset 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 | 4f4bebc36aad |
children | cfc938c2abbe |
files | mp3.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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;