Browse Source

fixing aspect (hopefully, i couldnt reproduce the bug)

Originally committed as revision 1317 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 23 years ago
parent
commit
706fc4dea6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/mjpeg.c

+ 4
- 1
libavcodec/mjpeg.c View File

@@ -1184,7 +1184,10 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
int y_density = get_bits(&s->gb, 16); int y_density = get_bits(&s->gb, 16);


//MN: needs to be checked //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 else
{ {


Loading…
Cancel
Save