Commit b51c39c2 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

Android vout: fix possible mutex leak.

Do not leak mutex if i_chroma is VLC_CODEC_ANDROID_OPAQUE.
Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
(cherry picked from commit 3d90771a7b113a554ddda9f3ea98ac137f5c9dcc)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e4a23cc5
......@@ -173,6 +173,10 @@ static void *InitLibrary(vout_display_sys_t *sys)
static int Open(vlc_object_t *p_this)
{
vout_display_t *vd = (vout_display_t *)p_this;
video_format_t fmt = vd->fmt;
if (fmt.i_chroma == VLC_CODEC_ANDROID_OPAQUE)
return VLC_EGENERIC;
/* */
if (vlc_mutex_trylock(&single_instance) != 0) {
......@@ -200,11 +204,6 @@ static int Open(vlc_object_t *p_this)
}
/* Setup chroma */
video_format_t fmt = vd->fmt;
if (fmt.i_chroma == VLC_CODEC_ANDROID_OPAQUE)
return VLC_EGENERIC;
char *psz_fcc = var_InheritString(vd, CFG_PREFIX "chroma");
if( psz_fcc ) {
fmt.i_chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, psz_fcc);
......
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