mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
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
This commit is contained in:
parent
e47ca217cb
commit
9044dd8399
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user