Changeset 54bc15d5 in ffmpeg
- Timestamp:
- Jan 14, 2015, 4:17:24 PM (10 years ago)
- Branches:
- master
- Children:
- 014b6b41, eb215be
- Parents:
- 932788be
- git-author:
- Anton Khirnov <anton@khirnov.net> (01/10/15 08:39:34)
- git-committer:
- Vittorio Giovara <vittorio.giovara@gmail.com> (01/14/15 16:17:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libavformat/id3v2.c
r932788be r54bc15d5 301 301 */ 302 302 static void read_geobtag(AVFormatContext *s, AVIOContext *pb, int taglen, 303 const char *tag, ID3v2ExtraMeta **extra_meta) 303 const char *tag, ID3v2ExtraMeta **extra_meta, 304 int isv34) 304 305 { 305 306 ID3v2ExtraMetaGEOB *geob_data = NULL; … … 433 434 434 435 static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, 435 const char *tag, ID3v2ExtraMeta **extra_meta) 436 const char *tag, ID3v2ExtraMeta **extra_meta, 437 int isv34) 436 438 { 437 439 int enc, pic_type; … … 443 445 int64_t end = avio_tell(pb) + taglen; 444 446 445 if (taglen <= 4 )447 if (taglen <= 4 || (!isv34 && taglen <= 6)) 446 448 goto fail; 447 449 … … 455 457 456 458 /* mimetype */ 457 taglen -= avio_get_str(pb, taglen, mimetype, sizeof(mimetype)); 459 if (isv34) { 460 taglen -= avio_get_str(pb, taglen, mimetype, sizeof(mimetype)); 461 } else { 462 avio_read(pb, mimetype, 3); 463 mimetype[3] = 0; 464 taglen -= 3; 465 } 466 458 467 while (mime->id != AV_CODEC_ID_NONE) { 459 468 if (!av_strncasecmp(mime->str, mimetype, sizeof(mimetype))) { … … 510 519 const char *tag4; 511 520 void (*read)(AVFormatContext *s, AVIOContext *pb, int taglen, 512 const char *tag, ID3v2ExtraMeta **extra_meta); 521 const char *tag, ID3v2ExtraMeta **extra_meta, 522 int isv34); 513 523 void (*free)(void *obj); 514 524 } ID3v2EMFunc; … … 665 675 else 666 676 /* parse special meta tag */ 667 extra_func->read(s, pbx, tlen, tag, extra_meta );677 extra_func->read(s, pbx, tlen, tag, extra_meta, isv34); 668 678 } else if (!tag[0]) { 669 679 if (tag[1])
Note:
See TracChangeset
for help on using the changeset viewer.