diff options
Diffstat (limited to 'src/gallium/state_trackers/omx/entrypoint.c')
-rw-r--r-- | src/gallium/state_trackers/omx/entrypoint.c | 15 |
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) |