comparison mov.c @ 6466:35bb7cdfe337 libavformat

In mov demuxer, do not override aspect ratio in tkhd by pasp like quicktime, fix issue #1539
author bcoudurier
date Wed, 08 Sep 2010 20:18:14 +0000
parents b6e3e7876e4c
children bae1afdd961a
comparison
equal deleted inserted replaced
6465:e0d8a52ce091 6466:35bb7cdfe337
582 582
583 if (c->fc->nb_streams < 1) 583 if (c->fc->nb_streams < 1)
584 return 0; 584 return 0;
585 st = c->fc->streams[c->fc->nb_streams-1]; 585 st = c->fc->streams[c->fc->nb_streams-1];
586 586
587 if (den != 0) { 587 if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect_ratio.num) && // default
588 if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect_ratio.num) && // default 588 (den != st->sample_aspect_ratio.den || num != st->sample_aspect_ratio.num)) {
589 (den != st->sample_aspect_ratio.den || num != st->sample_aspect_ratio.num)) 589 av_log(c->fc, AV_LOG_WARNING,
590 av_log(c->fc, AV_LOG_WARNING, 590 "sample aspect ratio already set to %d:%d, ignoring 'pasp' atom (%d:%d)\n",
591 "sample aspect ratio already set to %d:%d, overriding by 'pasp' atom\n", 591 st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
592 st->sample_aspect_ratio.num, st->sample_aspect_ratio.den); 592 num, den);
593 } else if (den != 0) {
593 st->sample_aspect_ratio.num = num; 594 st->sample_aspect_ratio.num = num;
594 st->sample_aspect_ratio.den = den; 595 st->sample_aspect_ratio.den = den;
595 } 596 }
596 return 0; 597 return 0;
597 } 598 }