diff --git a/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c b/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c index e69589fcea..51bc2d14bf 100644 --- a/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c +++ b/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c @@ -1406,7 +1406,8 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame) /* is it interlaced MJPEG? (we really don't want to scan the jpeg data * to see if there are two SOF markers in the packet to detect this) */ if (gst_video_decoder_get_packetized (bdec) && - dec->input_state && height > DCTSIZE && + dec->input_state && + dec->input_state->info.height != height && height > DCTSIZE && dec->input_state->info.height > (2 * (height - DCTSIZE)) && dec->input_state->info.height <= (height * 2) && dec->input_state->info.width == width) {