summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/omx/entrypoint.c13
-rw-r--r--src/gallium/state_trackers/omx/entrypoint.h2
-rw-r--r--src/gallium/state_trackers/omx/vid_dec.c3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
index bc8664b96a3..fb46849bf66 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -98,3 +98,16 @@ void omx_put_screen(void)
}
pipe_mutex_unlock(omx_lock);
}
+
+OMX_ERRORTYPE omx_workaround_Destructor(OMX_COMPONENTTYPE *comp)
+{
+ omx_base_component_PrivateType* priv = (omx_base_component_PrivateType*)comp->pComponentPrivate;
+
+ priv->state = OMX_StateInvalid;
+ tsem_up(priv->messageSem);
+
+ /* wait for thread to exit */;
+ pthread_join(priv->messageHandlerThread, NULL);
+
+ return omx_base_component_Destructor(comp);
+}
diff --git a/src/gallium/state_trackers/omx/entrypoint.h b/src/gallium/state_trackers/omx/entrypoint.h
index 41454beb048..af7c33763c2 100644
--- a/src/gallium/state_trackers/omx/entrypoint.h
+++ b/src/gallium/state_trackers/omx/entrypoint.h
@@ -43,4 +43,6 @@ extern int omx_component_library_Setup(stLoaderComponentType **stComponents);
struct vl_screen *omx_get_screen(void);
void omx_put_screen(void);
+OMX_ERRORTYPE omx_workaround_Destructor(OMX_COMPONENTTYPE *comp);
+
#endif
diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c
index 7be1dad1b9e..a747c51bb56 100644
--- a/src/gallium/state_trackers/omx/vid_dec.c
+++ b/src/gallium/state_trackers/omx/vid_dec.c
@@ -247,8 +247,7 @@ static OMX_ERRORTYPE vid_dec_Destructor(OMX_COMPONENTTYPE *comp)
if (priv->screen)
omx_put_screen();
- omx_base_filter_Destructor(comp);
- return OMX_ErrorNone;
+ return omx_workaround_Destructor(comp);
}
static OMX_ERRORTYPE vid_dec_SetParameter(OMX_HANDLETYPE handle, OMX_INDEXTYPE idx, OMX_PTR param)