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
This commit is contained in:
Guillaume Desmottes 2017-10-16 13:08:12 +02:00 committed by Sebastian Dröge
parent b3173144b7
commit cc0e3c8320
2 changed files with 4 additions and 2 deletions

View file

@ -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)",

View file

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