From: Scott Kanowitz Date: Thu, 12 Sep 2019 19:21:24 +0000 (-0400) Subject: jpegdec: Fix incorrect logic in EOI tag detection X-Git-Tag: 1.16.2~11 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fgst-plugins-good.git;a=commitdiff_plain;h=bb8a5e60a8d40ae0bb00adbcdf1d48289b1bdc91 jpegdec: Fix incorrect logic in EOI tag detection This change fixes the reversed logic in the EOI tag detection code. --- diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index bcbad7a..5442168 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -1208,7 +1208,7 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame) data = dec->current_frame_map.data; nbytes = dec->current_frame_map.size; - has_eoi = ((data[nbytes - 2] != 0xff) || (data[nbytes - 1] != 0xd9)); + has_eoi = ((data[nbytes - 2] == 0xff) && (data[nbytes - 1] == 0xd9)); /* some cameras fail to send an end-of-image marker (EOI), * add it if that is the case. */