summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-12-04 10:04:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-12-04 10:04:03 +0000
commit1e491e29c27cf6a6925666e4f4eac41b65e263d7 (patch)
tree99879470b8deeb55e7d88c62729b62ac27d249ee /libavcodec/mjpeg.c
parent855ea723b0ea450137e54674179751c14e8fc6b5 (diff)
cleanup
adding AVVideoFrame moving quality, pict_type, key_frame, qscale_table, ... to AVVideoFrame removing obsolete variables in AVCodecContext skiping of MBs in b frames correctly initalizing AVCodecContext picture buffer cleanup Originally committed as revision 1302 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 490f1ffae3..eed155c196 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -1180,9 +1180,11 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
get_bits(&s->gb, 8), get_bits(&s->gb, 8));
if (get_bits(&s->gb, 8) == 0)
{
- s->avctx->aspect_ratio_info = FF_ASPECT_EXTENDED;
- s->avctx->aspected_width = get_bits(&s->gb, 16);
- s->avctx->aspected_height = get_bits(&s->gb, 16);
+ int x_density = get_bits(&s->gb, 16);
+ 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);
}
else
{
@@ -1468,7 +1470,7 @@ eoi_parser:
}
/* dummy quality */
/* XXX: infer it with matrix */
- avctx->quality = 3;
+// avctx->quality = 3;
goto the_end;
}
break;
@@ -1635,7 +1637,7 @@ read_header:
}
/* dummy quality */
/* XXX: infer it with matrix */
- avctx->quality = 3;
+// avctx->quality = 3;
return buf_ptr - buf;
}