Commit 02f62a07 authored by michael's avatar michael

ensure that the aspect ratio is spec compliant


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10056 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b64d3e00
......@@ -301,8 +301,14 @@ static int write_streamheader(NUTContext *nut, ByteIOContext *bc, AVCodecContext
case CODEC_TYPE_VIDEO:
put_v(bc, codec->width);
put_v(bc, codec->height);
if(codec->sample_aspect_ratio.num<=0 || codec->sample_aspect_ratio.den<=0){
put_v(bc, 0);
put_v(bc, 0);
}else{
put_v(bc, codec->sample_aspect_ratio.num);
put_v(bc, codec->sample_aspect_ratio.den);
}
put_v(bc, 0); /* csp type -- unknown */
break;
default:
......
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