Commit 91a4846e authored by Felix Abecassis's avatar Felix Abecassis Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3d4d9fe5
...@@ -364,6 +364,7 @@ static int OpenDecoder(vlc_object_t *p_this) ...@@ -364,6 +364,7 @@ static int OpenDecoder(vlc_object_t *p_this)
if ((*env)->ExceptionOccurred(env)) { if ((*env)->ExceptionOccurred(env)) {
msg_Warn(p_dec, "Exception occurred in MediaCodec.configure with an output surface."); msg_Warn(p_dec, "Exception occurred in MediaCodec.configure with an output surface.");
(*env)->ExceptionClear(env); (*env)->ExceptionClear(env);
jni_UnlockAndroidSurface();
goto error; goto error;
} }
p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE; p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment