[Bug 767512] jpeg2000parse: support j2c and jp2 file formats

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jun 14 06:30:26 UTC 2016


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #329741|none                        |needs-work
             status|                            |

--- Comment #26 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 329741:
 --> (https://bugzilla.gnome.org/review?bug=767512&attachment=329741)

::: gst/videoparsers/gstjpeg2000parse.c
@@ +160,3 @@
+  jpeg2000parse->codec_format = GST_JPEG2000_PARSE_NO_CODEC;
+  jpeg2000parse->frame_size = 0;
+  jpeg2000parse->parsed_frame = FALSE;

Keeping this context now has the disadvantage that you will have to reset it on
DISCONT, flushing, after every frame, etc. It might be simpler to instead read
the frame size on every run (which should be cheap), but to go out early if we
don't have that much data yet

As you can see, your code became much more complicated because of this already
and that seems to be unneeded.

@@ +513,3 @@
+
+found_frame:
+  if (!jpeg2000parse->frame_size) {

You might have read the frame size from the box, but we might not actually have
enough data for that available yet. In which case we can't finish the frame yet
but have to wait a bit more

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