]> git.sesse.net Git - vlc/commitdiff
mediacodec: unlock the surface if configuring MediaCodec failed
authorFelix Abecassis <felix.abecassis@gmail.com>
Sun, 9 Feb 2014 17:22:27 +0000 (18:22 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Feb 2014 19:21:10 +0000 (20:21 +0100)
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).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/omxil/android_mediacodec.c

index d3eedc1a6ec0299f72c68c6693bd14e65df64ae7..5fc5013513f4bffdc0774707f673e45e729d7829 100644 (file)
@@ -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;