[vlc-commits] mediacodec: fix write on fmt_out audio/video union
Thomas Guillem
git at videolan.org
Fri Jan 12 09:48:49 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 10 11:04:31 2018 +0100| [72291aa6ec8ab63d957863d30c4511abe55c0ae7] | committer: Thomas Guillem
mediacodec: fix write on fmt_out audio/video union
(cherry picked from commit cf69f7b89202d9d9bfb7af999ad274974c1239d9)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=72291aa6ec8ab63d957863d30c4511abe55c0ae7
---
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