aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@smartjog.com>2006-01-23 06:40:08 +0000
committerBenjamin Larsson <banan@ludd.ltu.se>2006-01-23 06:40:08 +0000
commitc06e734a0120a528e40d0f07df578643a387937f (patch)
tree1ee0ab615058e59ba2fb3eac0636f6a5db14f93b /libavcodec/mjpeg.c
parentfdc7b57042c20ea8a8d8758543e542d28d56a3e1 (diff)
downloadffmpeg-c06e734a0120a528e40d0f07df578643a387937f.tar.gz
Mjpeg interlaced decoding fix, height was wrong while decoding (/2).
Patch by Baptiste Coudurier, baptiste _ coudurier at smartjog _ com. Originally committed as revision 4885 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 2a10934978..2487f61375 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -1144,7 +1144,6 @@ static int mjpeg_decode_sof(MJpegDecodeContext *s)
s->width = width;
s->height = height;
- avcodec_set_dimensions(s->avctx, width, height);
/* test interlaced mode */
if (s->first_picture &&
@@ -1153,9 +1152,11 @@ static int mjpeg_decode_sof(MJpegDecodeContext *s)
s->interlaced = 1;
// s->bottom_field = (s->interlace_polarity) ? 1 : 0;
s->bottom_field = 0;
- s->avctx->height *= 2;
+ height *= 2;
}
+ avcodec_set_dimensions(s->avctx, width, height);
+
s->qscale_table= av_mallocz((s->width+15)/16);
s->first_picture = 0;