Commit 894650f7 authored by Thomas Guillem's avatar Thomas Guillem

mediacodec: fix fail path in OpenDecoder

parent ce8e113f
...@@ -550,10 +550,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init) ...@@ -550,10 +550,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
p_sys->u.video.timestamp_fifo = timestamp_FifoNew(32); p_sys->u.video.timestamp_fifo = timestamp_FifoNew(32);
if (!p_sys->u.video.timestamp_fifo) if (!p_sys->u.video.timestamp_fifo)
{ goto bailout;
CloseDecoder(p_this);
return VLC_ENOMEM;
}
if (p_dec->fmt_in.i_codec == VLC_CODEC_H264) if (p_dec->fmt_in.i_codec == VLC_CODEC_H264)
h264_get_profile_level(&p_dec->fmt_in, h264_get_profile_level(&p_dec->fmt_in,
...@@ -562,10 +559,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init) ...@@ -562,10 +559,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
p_sys->psz_name = MediaCodec_GetName(VLC_OBJECT(p_dec), p_sys->mime, p_sys->psz_name = MediaCodec_GetName(VLC_OBJECT(p_dec), p_sys->mime,
p_sys->u.video.i_h264_profile); p_sys->u.video.i_h264_profile);
if (!p_sys->psz_name) if (!p_sys->psz_name)
{ goto bailout;
CloseDecoder(p_this);
return VLC_EGENERIC;
}
/* Check if we need late opening */ /* Check if we need late opening */
switch (p_dec->fmt_in.i_codec) switch (p_dec->fmt_in.i_codec)
...@@ -593,10 +587,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init) ...@@ -593,10 +587,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
p_sys->psz_name = MediaCodec_GetName(VLC_OBJECT(p_dec), p_sys->mime, 0); p_sys->psz_name = MediaCodec_GetName(VLC_OBJECT(p_dec), p_sys->mime, 0);
if (!p_sys->psz_name) if (!p_sys->psz_name)
{ goto bailout;
CloseDecoder(p_this);
return VLC_EGENERIC;
}
/* Marvel ACodec assert if channel count is 0 */ /* Marvel ACodec assert if channel count is 0 */
if (!strncmp(p_sys->psz_name, "OMX.Marvell", if (!strncmp(p_sys->psz_name, "OMX.Marvell",
...@@ -623,7 +614,13 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init) ...@@ -623,7 +614,13 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
} }
} }
return StartMediaCodec(p_dec); if (StartMediaCodec(p_dec) == VLC_SUCCESS)
return VLC_SUCCESS;
else
msg_Err(p_dec, "StartMediaCodec failed");
bailout:
CloseDecoder(p_this);
return VLC_EGENERIC;
} }
static int OpenDecoderNdk(vlc_object_t *p_this) static int OpenDecoderNdk(vlc_object_t *p_this)
......
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