[vlc-commits] mediacodec: don't need to update format after a start
Thomas Guillem
git at videolan.org
Fri Aug 28 18:54:56 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Aug 28 18:40:31 2015 +0200| [f0128b7c6da436e2baea0d916e0709485de55b31] | committer: Thomas Guillem
mediacodec: don't need to update format after a start
This only need to be done once MediaCodec returned a valid output format.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f0128b7c6da436e2baea0d916e0709485de55b31
---
modules/codec/omxil/mediacodec.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 85a8e45..4f74508 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -401,17 +401,7 @@ static int StartMediaCodec(decoder_t *p_dec)
args.audio.i_channel_count = p_dec->p_sys->u.audio.i_channels;
}
- i_ret = p_sys->api->start(p_sys->api, p_sys->psz_name, p_sys->mime, &args);
-
- if (i_ret == VLC_SUCCESS)
- {
- if (p_sys->api->b_direct_rendering)
- p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
- p_sys->b_update_format = true;
- return VLC_SUCCESS;
- }
- else
- return VLC_EGENERIC;
+ return p_sys->api->start(p_sys->api, p_sys->psz_name, p_sys->mime, &args);
}
/*****************************************************************************
@@ -875,7 +865,10 @@ static int Video_GetOutput(decoder_t *p_dec, picture_t **pp_out_pic,
&p_sys->u.video.ascd);
const char *name = "unknown";
- if (!p_sys->api->b_direct_rendering) {
+ if (p_sys->api->b_direct_rendering)
+ p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
+ else
+ {
if (!GetVlcChromaFormat(p_sys->u.video.i_pixel_format,
&p_dec->fmt_out.i_codec, &name)) {
msg_Err(p_dec, "color-format not recognized");
More information about the vlc-commits
mailing list