[vlc-commits] mediacodec: move size initialization

Thomas Guillem git at videolan.org
Thu Mar 30 15:10:17 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 30 14:06:05 2017 +0200| [ec75aa29843ef214fe80f15924ea48e43c60ea77] | committer: Thomas Guillem

mediacodec: move size initialization

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec75aa29843ef214fe80f15924ea48e43c60ea77
---

 modules/codec/omxil/mediacodec.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index cab628d..2fc5625 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -650,6 +650,8 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
     p_dec->fmt_out.i_cat = p_dec->fmt_in.i_cat;
     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);
@@ -681,8 +683,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
             /* Direct rendering: Request a valid OPAQUE Vout in order to get
              * the surface attached to it */
             p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
-            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 (UpdateOpaqueVout(p_dec) != VLC_SUCCESS)
             {
                 msg_Err(p_dec, "Opaque Vout request failed");



More information about the vlc-commits mailing list