X-Git-Url: https://git.videolan.org/?p=ffmpeg.git;a=blobdiff_plain;f=libavcodec%2Fmjpegbdec.c;h=93f6923cd5a929a30cf8a50920a0782e64cf1a21;hp=7056bd2b28ea04847b3d86344352f115354c83d6;hb=b180d9fe99a2b681d5b2005e31ab13912a752d4b;hpb=cf653d0811b1468089dbeea745e8019da0fc1e1c diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c index 7056bd2b28..93f6923cd5 100644 --- a/libavcodec/mjpegbdec.c +++ b/libavcodec/mjpegbdec.c @@ -109,7 +109,7 @@ read_header: if (s->interlaced) { s->bottom_field ^= 1; /* if not bottom field, do not output image yet */ - if (s->bottom_field && second_field_offs) + if (s->bottom_field != s->interlace_polarity && second_field_offs) { buf_ptr = buf + second_field_offs; second_field_offs = 0;