Commit e5927910 authored by Michael Niedermayer's avatar Michael Niedermayer

asfdec: flip the interpretation of the header aspect back

This reverts 2de88776

Fixes Ticket 1883
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 343c73e2
......@@ -785,12 +785,12 @@ static int asf_read_header(AVFormatContext *s)
if (!st->codec->bit_rate)
st->codec->bit_rate = asf->stream_bitrates[i];
if (asf->dar[i].num > 0 && asf->dar[i].den > 0){
av_reduce(&st->sample_aspect_ratio.den,
&st->sample_aspect_ratio.num,
av_reduce(&st->sample_aspect_ratio.num,
&st->sample_aspect_ratio.den,
asf->dar[i].num, asf->dar[i].den, INT_MAX);
} else if ((asf->dar[0].num > 0) && (asf->dar[0].den > 0) && (st->codec->codec_type==AVMEDIA_TYPE_VIDEO)) // Use ASF container value if the stream doesn't AR set.
av_reduce(&st->sample_aspect_ratio.den,
&st->sample_aspect_ratio.num,
av_reduce(&st->sample_aspect_ratio.num,
&st->sample_aspect_ratio.den,
asf->dar[0].num, asf->dar[0].den, INT_MAX);
av_dlog(s, "i=%d, st->codec->codec_type:%d, asf->dar %d:%d sar=%d:%d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment