mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
change sample aspect ratio test to be more clear, print old one
Originally committed as revision 16703 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5823e4b8f6
commit
f53ee31275
@ -439,10 +439,11 @@ static int mov_read_pasp(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
|
|||||||
const int den = get_be32(pb);
|
const int den = get_be32(pb);
|
||||||
AVStream * const st = c->fc->streams[c->fc->nb_streams-1];
|
AVStream * const st = c->fc->streams[c->fc->nb_streams-1];
|
||||||
if (den != 0) {
|
if (den != 0) {
|
||||||
if ((st->sample_aspect_ratio.den && den != st->sample_aspect_ratio.den) ||
|
if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect_ratio.num) && // default
|
||||||
(st->sample_aspect_ratio.num && num != st->sample_aspect_ratio.num))
|
(den != st->sample_aspect_ratio.den || num != st->sample_aspect_ratio.num))
|
||||||
av_log(c->fc, AV_LOG_WARNING,
|
av_log(c->fc, AV_LOG_WARNING,
|
||||||
"sample aspect ratio already set, overriding by 'pasp' atom\n");
|
"sample aspect ratio already set to %d:%d, overriding by 'pasp' atom\n",
|
||||||
|
st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
|
||||||
st->sample_aspect_ratio.num = num;
|
st->sample_aspect_ratio.num = num;
|
||||||
st->sample_aspect_ratio.den = den;
|
st->sample_aspect_ratio.den = den;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user