[Bug 787093] omx: add dynamic buffer mode from OMX 1.2.0
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Sep 6 19:31:02 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=787093
Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #358874|none |needs-work
status| |
--- Comment #5 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Review of attachment 358874:
--> (https://bugzilla.gnome.org/review?bug=787093&attachment=358874)
::: omx/gstomxvideoenc.c
@@ +1155,3 @@
+ if (input_size >= self->enc_in_port->port_def.nBufferSize &&
+ (self->enc_in_port->port_def.nBufferAlignment == 0 ||
+ input_size % self->enc_in_port->port_def.nBufferAlignment == 0)) {
That is not what alignment means. To check the alignment you need to map the
memory and check that the pointer value is a multiple of nBufferAlignment. For
video buffers, you should check that the stride matches the port definition and
that you have only 1 memory object.
To be robust, this check need to be done for every incoming buffers, in case it
changed. The dynamic buffer mode can't handle it, but this way you'll be able
to at least warn that buffers are dropped. Of course, bonus point if you want a
proper way to fallback.
@@ +1487,3 @@
+ * by the OMX component. */
+ if (!gst_omx_buffer_map_frame (outbuf, inbuf, info)) {
+ GST_ERROR_OBJECT (self, "Failed to map input buffer");
If this is fatal, then GST_ELEMENT_ERROR please.
--
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