Mercurial > libavcodec.hg
diff mjpeg.c @ 916:259f3efebef5 libavcodec
fixing aspect (hopefully, i couldnt reproduce the bug)
author | michaelni |
---|---|
date | Fri, 06 Dec 2002 15:01:48 +0000 |
parents | 22ee74da2cd3 |
children | c9bbd35064b6 |
line wrap: on
line diff
--- a/mjpeg.c Fri Dec 06 13:30:13 2002 +0000 +++ b/mjpeg.c Fri Dec 06 15:01:48 2002 +0000 @@ -1184,7 +1184,10 @@ int y_density = get_bits(&s->gb, 16); //MN: needs to be checked - s->avctx->aspect_ratio= s->width*y_density/((float)s->height*x_density); + if(x_density) + s->avctx->aspect_ratio= s->width*y_density/((float)s->height*x_density); + else + s->avctx->aspect_ratio= 0.0; } else {