diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-12-06 15:01:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-12-06 15:01:48 +0000 |
commit | 706fc4dea67a0d54eb26ce5024b603cf9bf5afa1 (patch) | |
tree | a19c9794caecbd6b4c4a621af6d929cf147e5bba | |
parent | 0d1e924668b1384ffbf4282e077f262a2c538596 (diff) | |
download | ffmpeg-streaming-706fc4dea67a0d54eb26ce5024b603cf9bf5afa1.zip ffmpeg-streaming-706fc4dea67a0d54eb26ce5024b603cf9bf5afa1.tar.gz |
fixing aspect (hopefully, i couldnt reproduce the bug)
Originally committed as revision 1317 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mjpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index eed155c..2e6dd8f 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -1184,7 +1184,10 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) 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 { |