comparison 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
comparison
equal deleted inserted replaced
915:75ee49a4a516 916:259f3efebef5
1182 { 1182 {
1183 int x_density = get_bits(&s->gb, 16); 1183 int x_density = get_bits(&s->gb, 16);
1184 int y_density = get_bits(&s->gb, 16); 1184 int y_density = get_bits(&s->gb, 16);
1185 1185
1186 //MN: needs to be checked 1186 //MN: needs to be checked
1187 s->avctx->aspect_ratio= s->width*y_density/((float)s->height*x_density); 1187 if(x_density)
1188 s->avctx->aspect_ratio= s->width*y_density/((float)s->height*x_density);
1189 else
1190 s->avctx->aspect_ratio= 0.0;
1188 } 1191 }
1189 else 1192 else
1190 { 1193 {
1191 skip_bits(&s->gb, 16); 1194 skip_bits(&s->gb, 16);
1192 skip_bits(&s->gb, 16); 1195 skip_bits(&s->gb, 16);