diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2017-10-16 13:08:12 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-10-19 16:19:16 +0200 |
commit | cc0e3c832066e047fa80c8aae1172bc3db1e69b0 (patch) | |
tree | a72f2277ab30d4ab25745fa05e4b87aba1527428 | |
parent | b3173144b7c1b12c9e1b7571f78659be45d813f6 (diff) | |
download | gst-omx-cc0e3c832066e047fa80c8aae1172bc3db1e69b0.tar.gz |
properly cast extension enums
OMX's allow 3rds party to define extensions using their own enums
(like OMX_VIDEO_CODINGEXTTYPE) and to be used as the general
ones (like OMX_VIDEO_CODINGTYPE).
Properly cast those to fix -Wenum-conversion warnings from some
compilers such as clang.
https://bugzilla.gnome.org/show_bug.cgi?id=789057
-rw-r--r-- | omx/gstomxh265enc.c | 3 | ||||
-rw-r--r-- | omx/gstomxvp8dec.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/omx/gstomxh265enc.c b/omx/gstomxh265enc.c index a57112a..3185ee3 100644 --- a/omx/gstomxh265enc.c +++ b/omx/gstomxh265enc.c @@ -341,7 +341,8 @@ set_intra_period (GstOMXH265Enc * self) err = gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc, - OMX_ALG_IndexParamVideoInstantaneousDecodingRefresh, &config_idr); + (OMX_INDEXTYPE) OMX_ALG_IndexParamVideoInstantaneousDecodingRefresh, + &config_idr); if (err != OMX_ErrorNone) { GST_ERROR_OBJECT (self, "can't set OMX_IndexConfigVideoAVCIntraPeriod %s (0x%08x)", diff --git a/omx/gstomxvp8dec.c b/omx/gstomxvp8dec.c index 61886b8..dee015c 100644 --- a/omx/gstomxvp8dec.c +++ b/omx/gstomxvp8dec.c @@ -91,7 +91,8 @@ gst_omx_vp8_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port, OMX_PARAM_PORTDEFINITIONTYPE port_def; gst_omx_port_get_port_definition (port, &port_def); - port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingVP8; + port_def.format.video.eCompressionFormat = + (OMX_VIDEO_CODINGTYPE) OMX_VIDEO_CodingVP8; ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone; return ret; |