Revision bd548b99 libavformat/mp3.c

View differences:

libavformat/mp3.c
582 582
{
583 583
    int totlen = 0;
584 584
    char tracktxt[10];
585
    char yeartxt[10];
585 586

  
586 587
    if(s->track)
587 588
        snprintf(tracktxt, sizeof(tracktxt) - 1, "%d", s->track);
589
    if(s->year)
590
        snprintf( yeartxt, sizeof(yeartxt)     , "%d", s->year );
588 591

  
589 592
    if(s->title[0])     totlen += 11 + strlen(s->title);
590 593
    if(s->author[0])    totlen += 11 + strlen(s->author);
......
592 595
    if(s->genre[0])     totlen += 11 + strlen(s->genre);
593 596
    if(s->copyright[0]) totlen += 11 + strlen(s->copyright);
594 597
    if(s->track)        totlen += 11 + strlen(tracktxt);
598
    if(s->year)         totlen += 11 + strlen(yeartxt);
595 599
    if(!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
596 600
        totlen += strlen(LIBAVFORMAT_IDENT) + 11;
597 601

  
......
610 614
    if(s->genre[0])     id3v2_put_ttag(s, s->genre,     MKBETAG('T', 'C', 'O', 'N'));
611 615
    if(s->copyright[0]) id3v2_put_ttag(s, s->copyright, MKBETAG('T', 'C', 'O', 'P'));
612 616
    if(s->track)        id3v2_put_ttag(s, tracktxt,     MKBETAG('T', 'R', 'C', 'K'));
617
    if(s->year)         id3v2_put_ttag(s, yeartxt,      MKBETAG('T', 'Y', 'E', 'R'));
613 618
    if(!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
614 619
        id3v2_put_ttag(s, LIBAVFORMAT_IDENT,            MKBETAG('T', 'E', 'N', 'C'));
615 620
    return 0;

Also available in: Unified diff