diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-01-01 18:47:27 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-01-01 18:47:27 +0300 |
commit | 1e96b151fa6e9931c626283b7dfc15e4ec0095aa (patch) | |
tree | d446814f822f9a3125c1b60414e1f9c68b6bdb64 /libavformat/mp3dec.c | |
parent | 15c60c8af2271cd7d5c6c6ce7f8f127a32f18cfd (diff) | |
parent | 955aec3c7c7be39b659197e1ec379a09f2b7c41c (diff) |
Merge commit '955aec3c7c7be39b659197e1ec379a09f2b7c41c'
* commit '955aec3c7c7be39b659197e1ec379a09f2b7c41c':
mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_header
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r-- | libavformat/mp3dec.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 95b70f7c29..8d41657058 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -82,9 +82,6 @@ static int mp3_read_probe(AVProbeData *p) for(; buf < end; buf= buf2+1) { buf2 = buf; - if(ff_mpa_check_header(AV_RB32(buf2))) - continue; - for(frames = 0; buf2 < end; frames++) { int dummy; header = AV_RB32(buf2); @@ -302,14 +299,16 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base) MPADecodeHeader c; int vbrtag_size = 0; MP3DecContext *mp3 = s->priv_data; + int ret; ffio_init_checksum(s->pb, ff_crcA001_update, 0); v = avio_rb32(s->pb); - if(ff_mpa_check_header(v) < 0) - return -1; - if (avpriv_mpegaudio_decode_header(&c, v) == 0) + ret = avpriv_mpegaudio_decode_header(&c, v); + if (ret < 0) + return ret; + else if (ret == 0) vbrtag_size = c.frame_size; if(c.layer != 3) return -1; |