id3v2: fix skipping extended header in id3v2.4
In v2.4, the length includes the length field itself. (cherry picked from commit ddb4431208745ea270dce8fce4cba999f0ed4303) Conflicts: libavformat/id3v2.c Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
62c4739348
commit
f70c720d42
@ -187,8 +187,17 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isv34 && flags & 0x40) /* Extended header present, just skip over it */
|
if (isv34 && flags & 0x40) { /* Extended header present, just skip over it */
|
||||||
url_fskip(s->pb, get_size(s->pb, 4));
|
int extlen = get_size(s->pb, 4);
|
||||||
|
if (version == 4)
|
||||||
|
extlen -= 4; // in v2.4 the length includes the length field we just read
|
||||||
|
|
||||||
|
if (extlen < 0) {
|
||||||
|
reason = "invalid extended header length";
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
url_fskip(s->pb, extlen);
|
||||||
|
}
|
||||||
|
|
||||||
while (len >= taghdrlen) {
|
while (len >= taghdrlen) {
|
||||||
if (isv34) {
|
if (isv34) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user