Revision c86ec2f4 libavformat/avidec.c

View differences:

libavformat/avidec.c
523 523
            }
524 524
            url_fseek(pb, i+size, SEEK_SET);
525 525
            break;
526
        case MKTAG('v', 'p', 'r', 'p'):
527
            if(stream_index < (unsigned)s->nb_streams && size > 9*4){
528
                AVRational active, active_aspect;
529

  
530
                st = s->streams[stream_index];
531
                get_le32(pb);
532
                get_le32(pb);
533
                get_le32(pb);
534
                get_le32(pb);
535
                get_le32(pb);
536

  
537
                active_aspect.num= get_le16(pb);
538
                active_aspect.den= get_le16(pb);
539
                active.num       = get_le32(pb);
540
                active.den       = get_le32(pb);
541
                get_le32(pb); //nbFieldsPerFrame
542

  
543
                if(active_aspect.num && active_aspect.den && active.num && active.den){
544
                    st->codec->sample_aspect_ratio= av_div_q(active_aspect, active);
545
//av_log(s, AV_LOG_ERROR, "vprp %d/%d %d/%d\n", active_aspect.num, active_aspect.den, active.num, active.den);
546
                }
547
                size -= 9*4;
548
            }
549
            url_fseek(pb, size, SEEK_CUR);
550
            break;
526 551
        case MKTAG('I', 'N', 'A', 'M'):
527 552
            avi_read_tag(pb, s->title, sizeof(s->title), size);
528 553
            break;

Also available in: Unified diff