[vlc-commits] videotoolbox: move back fmt_out init to OpenDecoder

Thomas Guillem git at videolan.org
Fri Jan 24 11:37:48 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 24 10:20:58 2020 +0100| [a2e071135a130a1e7ed8d5687f01cbfd08d376f9] | committer: Thomas Guillem

videotoolbox: move back fmt_out init to OpenDecoder

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

 modules/codec/videotoolbox.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
index 85bc7064f2..c34446727c 100644
--- a/modules/codec/videotoolbox.c
+++ b/modules/codec/videotoolbox.c
@@ -1340,15 +1340,6 @@ CreateVideoContext(decoder_t *p_dec)
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
 
-    p_dec->fmt_out.video = p_dec->fmt_in.video;
-    p_dec->fmt_out.video.p_palette = NULL;
-
-    if (!p_dec->fmt_out.video.i_sar_num || !p_dec->fmt_out.video.i_sar_den)
-    {
-        p_dec->fmt_out.video.i_sar_num = 1;
-        p_dec->fmt_out.video.i_sar_den = 1;
-    }
-
     vlc_decoder_device *dec_dev = decoder_GetDecoderDevice(p_dec);
     if (!dec_dev || dec_dev->type != VLC_DECODER_DEVICE_VIDEOTOOLBOX)
     {
@@ -1428,6 +1419,15 @@ static int OpenDecoder(vlc_object_t *p_this)
         free(cvpx_chroma);
     }
 
+    p_dec->fmt_out.video = p_dec->fmt_in.video;
+    p_dec->fmt_out.video.p_palette = NULL;
+
+    if (!p_dec->fmt_out.video.i_sar_num || !p_dec->fmt_out.video.i_sar_den)
+    {
+        p_dec->fmt_out.video.i_sar_num = 1;
+        p_dec->fmt_out.video.i_sar_den = 1;
+    }
+
     i_ret = CreateVideoContext(p_dec);
     if (i_ret != VLC_SUCCESS)
     {



More information about the vlc-commits mailing list