[vlc-devel] [PATCH 2/5] mediacodec: lock InsertInflightPicture
Thomas Guillem
thomas at gllm.fr
Tue Dec 16 19:42:46 CET 2014
---
modules/codec/omxil/android_mediacodec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c
index bab8522..f429dbe 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -787,7 +787,9 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
p_picsys->priv.hw.i_index = index;
p_picsys->priv.hw.b_valid = true;
+ vlc_mutex_lock(get_android_opaque_mutex());
InsertInflightPicture(p_dec, p_pic, index);
+ vlc_mutex_unlock(get_android_opaque_mutex());
} else {
jobject buf = (*env)->GetObjectArrayElement(env, p_sys->output_buffers, index);
//jsize buf_size = (*env)->GetDirectBufferCapacity(env, buf);
--
2.1.3
More information about the vlc-devel
mailing list