diff options
author | Josep Torra <n770galaxy@gmail.com> | 2013-05-20 12:06:34 +0200 |
---|---|---|
committer | Josep Torra <n770galaxy@gmail.com> | 2013-05-20 12:28:04 +0200 |
commit | e701d5bc4423d1e3e9b334fb896ae926f69e1130 (patch) | |
tree | 5dfc59fad32d662e04c7eb1d6b4e9b86170b54bd | |
parent | f144a5c3ce7566f561d38995350dfe3ccc78c680 (diff) | |
download | gst-omx-e701d5bc4423d1e3e9b334fb896ae926f69e1130.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.
Conflicts:
omx/gstomxaudioenc.c
omx/gstomxvideodec.c
omx/gstomxvideoenc.c
-rw-r--r-- | omx/gstomxaudioenc.c | 2 | ||||
-rw-r--r-- | omx/gstomxvideodec.c | 2 | ||||
-rw-r--r-- | omx/gstomxvideoenc.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c index c4bdcbc..66e9406 100644 --- a/omx/gstomxaudioenc.c +++ b/omx/gstomxaudioenc.c @@ -530,6 +530,8 @@ eos: flow_ret = GST_FLOW_UNEXPECTED; } 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 cdecf84..8921fb5 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -1472,6 +1472,8 @@ eos: flow_ret = GST_FLOW_UNEXPECTED; } 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 9d528fb..51a4a77 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -907,6 +907,8 @@ eos: flow_ret = GST_FLOW_UNEXPECTED; } 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 */ |