]> git.sesse.net Git - vlc/commitdiff
mediacodec: lock InsertInflightPicture
authorThomas Guillem <thomas@gllm.fr>
Tue, 16 Dec 2014 18:42:46 +0000 (19:42 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 17 Dec 2014 14:00:42 +0000 (15:00 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/omxil/android_mediacodec.c

index bab852248ecbff8b6ee3ce55153df8aa061ea96c..f429dbe5b0595ae887772cb9c644c429ae718fb1 100644 (file)
@@ -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);