aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-09-08 20:18:14 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-09-08 20:18:14 +0000
commit9044dd83991491309ecb76c389502e410897d7d2 (patch)
tree8a1048ddb6efebe431158ad059e2006d8416ee56 /libavformat/mov.c
parente47ca217cb5865560366d0db20dd34984c340084 (diff)
downloadffmpeg-9044dd83991491309ecb76c389502e410897d7d2.tar.gz
In mov demuxer, do not override aspect ratio in tkhd by pasp like quicktime, fix issue #1539
Originally committed as revision 25080 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7cb8c7b51b..1657c2ac99 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -584,12 +584,13 @@ static int mov_read_pasp(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
- if (den != 0) {
- if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect_ratio.num) && // default
- (den != st->sample_aspect_ratio.den || num != st->sample_aspect_ratio.num))
- av_log(c->fc, AV_LOG_WARNING,
- "sample aspect ratio already set to %d:%d, overriding by 'pasp' atom\n",
- st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
+ if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect_ratio.num) && // default
+ (den != st->sample_aspect_ratio.den || num != st->sample_aspect_ratio.num)) {
+ av_log(c->fc, AV_LOG_WARNING,
+ "sample aspect ratio already set to %d:%d, ignoring 'pasp' atom (%d:%d)\n",
+ st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
+ num, den);
+ } else if (den != 0) {
st->sample_aspect_ratio.num = num;
st->sample_aspect_ratio.den = den;
}