Revision 6da54074

View differences:

libavformat/mov.c
430 430
    return 0;
431 431
}
432 432

  
433
static int mov_read_pasp(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
434
{
435
    const int num = get_be32(pb);
436
    const int den = get_be32(pb);
437
    AVStream * const st = c->fc->streams[c->fc->nb_streams-1];
438
    if (den != 0) {
439
        if ((st->sample_aspect_ratio.den && den != st->sample_aspect_ratio.den) ||
440
            (st->sample_aspect_ratio.num && num != st->sample_aspect_ratio.num))
441
            av_log(c->fc, AV_LOG_WARNING,
442
                   "sample aspect ratio already set, overriding by 'pasp' atom\n");
443
        st->sample_aspect_ratio.num = num;
444
        st->sample_aspect_ratio.den = den;
445
    }
446
    return 0;
447
}
448

  
433 449
/* this atom contains actual media data */
434 450
static int mov_read_mdat(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
435 451
{
......
1754 1770
{ MKTAG('S','M','I',' '), mov_read_smi }, /* Sorenson extension ??? */
1755 1771
{ MKTAG('a','l','a','c'), mov_read_extradata }, /* alac specific atom */
1756 1772
{ MKTAG('a','v','c','C'), mov_read_glbl },
1773
{ MKTAG('p','a','s','p'), mov_read_pasp },
1757 1774
{ MKTAG('s','t','b','l'), mov_read_default },
1758 1775
{ MKTAG('s','t','c','o'), mov_read_stco },
1759 1776
{ MKTAG('s','t','s','c'), mov_read_stsc },

Also available in: Unified diff