Revision 525fcb27

View differences:

libavformat/mov.c
1802 1802
        sc->pb = c->fc->pb;
1803 1803

  
1804 1804
    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
1805
        if (st->codec->width != sc->width || st->codec->height != sc->height) {
1806
            AVRational r = av_d2q(((double)st->codec->height * sc->width) /
1807
                                  ((double)st->codec->width * sc->height), INT_MAX);
1808
            if (st->sample_aspect_ratio.num)
1809
                st->sample_aspect_ratio = av_mul_q(st->sample_aspect_ratio, r);
1810
            else
1811
                st->sample_aspect_ratio = r;
1805
        if (!st->sample_aspect_ratio.num &&
1806
            (st->codec->width != sc->width || st->codec->height != sc->height)) {
1807
            st->sample_aspect_ratio = av_d2q(((double)st->codec->height * sc->width) /
1808
                                             ((double)st->codec->width * sc->height), INT_MAX);
1812 1809
        }
1813 1810

  
1814 1811
        av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,

Also available in: Unified diff