decoder/jpeg: stop decoding after EOI
decoder/jpeg: stop decoding after EOI

Based on the comment in the EOI case, it appears the intention,
and rightfully so, is to break out of the decode loop after
encountering the EOI in the JPEG data stream.  However, the break
statement only breaks out of the case block.  This causes the
decode loop to continue parsing trailing data and can result
in erroneous behavior if the trailing data is malformed.

To fix this, return immediately when the EOI is encountered so
that we don't attempt to parse invalid trailing data.

The decoder is only intended to decode/parse a single JPEG image.
If the user wants to decode multiple JPEG's (e.g. an MJPEG file)
then they can call decode() multiple times with each distinct sequence
of JPEG data (i.e. user is responsible for splitting an MJPEG into
separate JPEG's and should not send the entire MJPEG stream to a
single call to decode()).

Signed-off-by: U. Artie Eoff <32aece0d55055227b44d04b7d0051cf3d04ee871@intel.com>

halleyzhao/libyami,seanvk/libyami,seanvk/libyami,lizhong1008/libyami,halleyzhao/libyami,clearlylin/libyami,uartie/libyami,chivakker/libyami,zhaobob/libyami,01org/libyami,dspmeng/libyami,01org/libyami,clearlylin/libyami,chivakker/libyami,YuJiankang/libyami,YuJiankang/libyami,yizhouwei/libyami,clearlylin/libyami,lizhong1008/libyami,zhaobob/libyami,andyLiuChina/libyami,dspmeng/libyami,yizhouwei/libyami,uartie/libyami,lizhong1008/libyami,stripes416/libyami,chivakker/libyami,01org/libyami,halleyzhao/libyami,uartie/libyami,andyLiuChina/libyami,stripes416/libyami,stripes416/libyami,halleyzhao/libyami,andyLiuChina/libyami,yizhouwei/libyami,YuJiankang/libyami,andyLiuChina/libyami,seanvk/libyami,zhaobob/libyami,dspmeng/libyami