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

Martin Storsjö martin at martin.st
Sun Feb 9 21:57:33 CET 2014


On Sun, 9 Feb 2014, Felix Abecassis wrote:

> 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

Ok

// Martin



More information about the vlc-devel mailing list