[Bug 791988] New: jpeg: Fixup frames without an EOI marker
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Dec 27 17:36:41 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=791988
Bug ID: 791988
Summary: jpeg: Fixup frames without an EOI marker
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: elezegarcia at gmail.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 366021
--> https://bugzilla.gnome.org/attachment.cgi?id=366021&action=edit
jpeg: Fixup frames without an EOI marker
Quoting the patch attached:
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.
An equivalent version of this change is used in production. We came across some
cameras that send frames without EOI, thus breaking one of our gstreamer
pipelines; the attached patch fixes the problem.
This patch is tested via a crafted corrupted JPEGs, removing EOI markers:
# create a three-frame stream
$ gst-launch-1.0 videotestsrc num-buffers=3 ! jpegenc ! filesink
location=j.jpeg
# search and remove EOI
$ hexedit
# we good?
$ GST_DEBUG=jpegdec:9 gst-launch-1.0 filesrc location=j.jpeg ! jpegdec !
fakesink
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list