[vlc-commits] mediacodec: lock InsertInflightPicture

Thomas Guillem git at videolan.org
Wed Dec 17 15:01:00 CET 2014


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Dec 16 19:42:46 2014 +0100| [7609d6bfa49b6467ae490c2f4fb4f24f8e45b0bc] | committer: Jean-Baptiste Kempf

mediacodec: lock InsertInflightPicture

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7609d6bfa49b6467ae490c2f4fb4f24f8e45b0bc
---

 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);



More information about the vlc-commits mailing list