diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-28 16:40:17 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-28 16:40:17 +0000 |
commit | 5692ed3ad4b6ce25ce6ffb64a0ce33265623c21c (patch) | |
tree | 1f6003e6c8895a0694ea088d844dfc1a7268cf94 /libavformat/mp3.c | |
parent | f2e033ac84f3259d4ebbdbb7159cbae237f504aa (diff) | |
download | ffmpeg-5692ed3ad4b6ce25ce6ffb64a0ce33265623c21c.tar.gz |
Many mp3s seem to contain padding after id3 tags that is not considered in the
tag size. Skip this to make the format probing quicker.
Originally committed as revision 22111 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mp3.c')
-rw-r--r-- | libavformat/mp3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c index 4579773369..a111b19272 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -45,10 +45,12 @@ static int mp3_read_probe(AVProbeData *p) if(ff_id3v2_match(buf0)) { buf0 += ff_id3v2_tag_len(buf0); } + end = p->buf + p->buf_size - sizeof(uint32_t); + while(buf0 < end && !*buf0) + buf0++; max_frames = 0; buf = buf0; - end = p->buf + p->buf_size - sizeof(uint32_t); for(; buf < end; buf= buf2+1) { buf2 = buf; |