After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795352 - omxvideoenc/dec: fix handling of component enabling failing
omxvideoenc/dec: fix handling of component enabling failing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other Linux
: Normal normal
: 1.14.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-18 10:53 UTC by Guillaume Desmottes
Modified: 2018-04-18 12:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omxvideoenc/dec: fix handling of component enabling failing (2.66 KB, patch)
2018-04-18 10:54 UTC, Guillaume Desmottes
none Details | Review

Description Guillaume Desmottes 2018-04-18 10:53:43 UTC
.
Comment 1 Guillaume Desmottes 2018-04-18 10:54:01 UTC
Created attachment 371083 [details] [review]
omxvideoenc/dec: fix handling of component enabling failing

- Report the error from OMX if any (OMX_EventError)
- If not report the failing to the application (GST_ELEMENT_ERROR)
- return GST_FLOW_ERROR rather than FALSE
- don't leak @frame
Comment 2 Nicolas Dufresne (ndufresne) 2018-04-18 11:53:57 UTC
Review of attachment 371083 [details] [review]:

::: omx/gstomxvideodec.c
@@ +2735,3 @@
+      if (!gst_omx_video_dec_enable (self, frame->input_buffer)) {
+        /* Report the OMX error, if any */
+        if (gst_omx_component_get_last_error (self->dec) != OMX_ErrorNone)

I would simply goto enable_error, and check for this in there.
Comment 3 Guillaume Desmottes 2018-04-18 12:27:51 UTC
Thanks.

I changed that and merged to master (e1a149f3d52ab9e1f5d7b7f9a83eb59be2f6e0ee) and 1.14 (7f4949317970beeb2eb370656407b72c7593eac5).