jpeg: Fixup frames without an EOI marker
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Thu, 28 Sep 2017 21:00:38 +0000 (18:00 -0300)
committerMathieu Duponchelle <mathieu@centricular.com>
Wed, 27 Dec 2017 18:39:39 +0000 (19:39 +0100)
commit10ff3c8e14e8fba9e0a5d696dce0bea27de644d7
treecad6eb33777e9b0be27efaea856a44b478355fb8
parent7d97bf2f81678a7e8192ddbad9d710f9ec01f3f0
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
ext/jpeg/gstjpegdec.c