[Bug 766236] rtp j2k payload/depayload messes up colours in sample pattern

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon May 30 06:00:01 UTC 2016


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

--- Comment #64 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Take a look at
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst/videoparsers/gstpngparse.c#n124

That's where all the parsing work is happening. You get data from the base
class, parse it and then decide if you need more data or if you can finish the
frame. That's all that there is about the baseparse API for your case.

The PNG parser first searches for the PNG_SIGNATURE in the stream and drops
everything before that (that is, it searches for the beginning of a frame). And
once it has that, it parses the frame and requests more data from the base
class if it has not enough data yet. Once the full frame is there and all
information is parsed, it finishes the frame and then starts again with looking
for the signature.


Note that looking for the first 0xff byte is not enough. For a proper parser
you need to look at all the tags of a frame, and then finish a frame only when
you have all tags of a complete frame (but not any of the next). You should
finish one frame at a time.

-- 
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