summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2013-05-20 12:06:34 +0200
committerJosep Torra <n770galaxy@gmail.com>2013-05-20 12:10:08 +0200
commita59b39b998d9a4996ac42627301d280084302680 (patch)
tree467dc0e30837c4a26b2c2c8344bdeaf060e84124
parent80d885b5a20ecfd5b40ace7857736ea651200224 (diff)
downloadgst-omx-a59b39b998d9a4996ac42627301d280084302680.tar.gz
omx: Take lock on EOS to update the flow return value
Fixes "GThread-ERROR **: file gthread-posix.c: line 171 (g_mutex_free_posix_impl): error 'Device or resource busy' during 'pthread_mutex_destroy ((pthread_mutex_t *) mutex)'" in _finalize.
-rw-r--r--omx/gstomxaudioenc.c2
-rw-r--r--omx/gstomxvideodec.c2
-rw-r--r--omx/gstomxvideoenc.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c
index 6866eeb..3c368c0 100644
--- a/omx/gstomxaudioenc.c
+++ b/omx/gstomxaudioenc.c
@@ -513,6 +513,8 @@ eos:
flow_ret = GST_FLOW_EOS;
}
g_mutex_unlock (&self->drain_lock);
+
+ GST_AUDIO_ENCODER_STREAM_LOCK (self);
self->downstream_flow_ret = flow_ret;
/* Here we fallback and pause the task for the EOS case */
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index f9f5013..d58a41f 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1643,6 +1643,8 @@ eos:
flow_ret = GST_FLOW_EOS;
}
g_mutex_unlock (&self->drain_lock);
+
+ GST_VIDEO_DECODER_STREAM_LOCK (self);
self->downstream_flow_ret = flow_ret;
/* Here we fallback and pause the task for the EOS case */
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index 0e8bcb6..66f077c 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -907,6 +907,8 @@ eos:
flow_ret = GST_FLOW_EOS;
}
g_mutex_unlock (&self->drain_lock);
+
+ GST_VIDEO_ENCODER_STREAM_LOCK (self);
self->downstream_flow_ret = flow_ret;
/* Here we fallback and pause the task for the EOS case */