# HG changeset patch # User banan # Date 1137998408 0 # Node ID 8d05d4036b6a471d9b38243d05abe2036401702f # Parent 259fed5adf5ddc7ba33bb9c7ad8f36f3d3b33acc Mjpeg interlaced decoding fix, height was wrong while decoding (/2). Patch by Baptiste Coudurier, baptiste _ coudurier at smartjog _ com. diff -r 259fed5adf5d -r 8d05d4036b6a mjpeg.c --- a/mjpeg.c Sun Jan 22 20:54:52 2006 +0000 +++ b/mjpeg.c Mon Jan 23 06:40:08 2006 +0000 @@ -1144,7 +1144,6 @@ s->width = width; s->height = height; - avcodec_set_dimensions(s->avctx, width, height); /* test interlaced mode */ if (s->first_picture && @@ -1153,9 +1152,11 @@ 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;