[vlc-commits] mediacodec: fix write on fmt_out audio/video union
Thomas Guillem
git at videolan.org
Wed Jan 10 12:14:24 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 10 11:04:31 2018 +0100| [cf69f7b89202d9d9bfb7af999ad274974c1239d9] | committer: Thomas Guillem
mediacodec: fix write on fmt_out audio/video union
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf69f7b89202d9d9bfb7af999ad274974c1239d9
---
modules/codec/omxil/mediacodec.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 40677deff2..462502c169 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -643,11 +643,6 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
p_dec->p_sys = p_sys;
- p_dec->fmt_out.video = p_dec->fmt_in.video;
- p_dec->fmt_out.audio = p_dec->fmt_in.audio;
- p_dec->fmt_out.video.i_visible_width = p_dec->fmt_out.video.i_width;
- p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_height;
-
vlc_mutex_init(&p_sys->lock);
vlc_cond_init(&p_sys->cond);
vlc_cond_init(&p_sys->dec_cond);
@@ -700,6 +695,10 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
else
p_sys->video.i_angle = 0;
+ p_dec->fmt_out.video = p_dec->fmt_in.video;
+ p_dec->fmt_out.video.i_visible_width = p_dec->fmt_out.video.i_width;
+ p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_height;
+
if (UpdateVout(p_dec) != VLC_SUCCESS)
{
msg_Err(p_dec, "Opaque Vout request failed");
@@ -720,6 +719,8 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
msg_Warn(p_dec, "codec need a valid channel count");
goto bailout;
}
+
+ p_dec->fmt_out.audio = p_dec->fmt_in.audio;
}
/* Try first to configure CSD */
More information about the vlc-commits
mailing list