Browse Source

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
tags/v0.5
Baptiste Coudurier Benjamin Larsson 20 years ago
parent
commit
c06e734a01
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/mjpeg.c

+ 3
- 2
libavcodec/mjpeg.c View File

@@ -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;


Loading…
Cancel
Save