[vlc-commits] mediacodec: unlock the surface if configuring MediaCodec failed

Felix Abecassis git at videolan.org
Sun Feb 9 20:22:27 CET 2014


vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Sun Feb  9 18:22:27 2014 +0100| [91a4846e1eab08e8a6a89420fe58b5f2367d4ad7] | committer: Jean-Baptiste Kempf

mediacodec: unlock the surface if configuring MediaCodec failed

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 at videolan.org>

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

 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..5fc5013 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;



More information about the vlc-commits mailing list