jpeg: Fixup frames without an EOI marker
jpeg: Fixup frames without an EOI marker

Some cameras fail to send an end-of-image marker (EOI)
and can't be properly decoded by either JPEG or libjpeg.

This commit parses the frame, making sure it has an EOI.
If there isn't one, the EOI gets added to the buffer.

A similar fixup is done in the rtpjpegdepay element,
and it makes sense to do it in jpegdec as well.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

https://bugzilla.gnome.org/show_bug.cgi?id=791988

pexip/gst-plugins-good,StreamUtils/gst-plugins-good,GStreamer/gst-plugins-good,GStreamer/gst-plugins-good,GrokImageCompression/gst-plugins-good,GrokImageCompression/gst-plugins-good,StreamUtils/gst-plugins-good,GrokImageCompression/gst-plugins-good,pexip/gst-plugins-good,pexip/gst-plugins-good,StreamUtils/gst-plugins-good,pexip/gst-plugins-good,GrokImageCompression/gst-plugins-good,StreamUtils/gst-plugins-good,GStreamer/gst-plugins-good,GStreamer/gst-plugins-good,pexip/gst-plugins-good