aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/omx/entrypoint.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2014-03-01 12:31:20 +0100
committerChristian König <[email protected]>2014-03-03 18:22:38 +0100
commitbd6654aa38b75faee4d016aecfe2b1dd0dbbb78b (patch)
tree5cae464ca3028d941294ecfa501dd8e08b6fae44 /src/gallium/state_trackers/omx/entrypoint.c
parent79c83837c93ddcdd39ffa5d701117b7126bad65f (diff)
st/omx: always advertise all components
omx_component_library_Setup should return all entrypoints the library implements, independent of what is available on the current hardware. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74944 Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/omx/entrypoint.c')
-rw-r--r--src/gallium/state_trackers/omx/entrypoint.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
index 52b2495dd99..d6f149e623e 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -51,21 +51,22 @@ static unsigned omx_usecount = 0;
int omx_component_library_Setup(stLoaderComponentType **stComponents)
{
OMX_ERRORTYPE r;
+ unsigned i = 0;
if (stComponents == NULL)
return 2;
/* component 0 - video decoder */
- r = vid_dec_LoaderComponent(stComponents[0]);
- if (r != OMX_ErrorNone)
- return r;
+ r = vid_dec_LoaderComponent(stComponents[i]);
+ if (r == OMX_ErrorNone)
+ ++i;
/* component 1 - video encoder */
- r = vid_enc_LoaderComponent(stComponents[1]);
- if (r != OMX_ErrorNone)
- return r;
+ r = vid_enc_LoaderComponent(stComponents[i]);
+ if (r == OMX_ErrorNone)
+ ++i;
- return 2;
+ return i;
}
struct vl_screen *omx_get_screen(void)