[vlc-devel] [PATCH 2/4] mediacodec: unlock the surface if configuring MediaCodec failed

Felix Abecassis felix.abecassis at gmail.com
Sun Feb 9 18:22:27 CET 2014


Solve a bug where the display stays black when the dimension of the
video is not supported by MediaCodec (either too small or too large).
---
 modules/codec/omxil/android_mediacodec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c
index d3eedc1..4857f49 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -364,6 +364,7 @@ static int OpenDecoder(vlc_object_t *p_this)
             if ((*env)->ExceptionOccurred(env)) {
                 msg_Warn(p_dec, "Exception occurred in MediaCodec.configure with an output surface.");
                 (*env)->ExceptionClear(env);
+		jni_UnlockAndroidSurface();
                 goto error;
             }
             p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
-- 
1.8.3.2




More information about the vlc-devel mailing list