Commit 81d850f1 authored by kostya's avatar kostya

Set correct aspect ratio (it's sample aspect, not display aspect)

Patch by Zuxy Meng
(mail = `echo "Zuxy Meng" | tr "[A-Z] " "[a-z]." | sed "s/$/@gmail.com/"`)



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7806 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 328e9be4
......@@ -482,11 +482,9 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
int stream_num= asf->asfid2avid[i];
if(stream_num>=0 && dar[i].num>0 && dar[i].den>0){
AVCodecContext *codec= s->streams[stream_num]->codec;
codec->sample_aspect_ratio=
av_div_q(
dar[i],
(AVRational){codec->width, codec->height}
);
av_reduce(&codec->sample_aspect_ratio.num,
&codec->sample_aspect_ratio.den,
dar[i].num, dar[i].den, INT_MAX);
//av_log(NULL, AV_LOG_ERROR, "dar %d:%d sar=%d:%d\n", dar[i].num, dar[i].den, codec->sample_aspect_ratio.num, codec->sample_aspect_ratio.den);
}
}
......
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