[vlc-commits] decoder: fix getting the decoder device when a new vout is not needed

Steve Lhomme git at videolan.org
Wed Jan 8 08:28:08 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jan  6 15:54:26 2020 +0100| [840bf702f6f2a48e4de142a64b787d15224dee45] | committer: Steve Lhomme

decoder: fix getting the decoder device when a new vout is not needed

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

 src/input/decoder.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 2aaacf2044..17a36df3c9 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -532,10 +532,18 @@ static int CreateVoutIfNeeded(struct decoder_owner *p_owner,
 
     if( !need_vout )
     {
-        if (pp_vout)
+        if (pp_vout || pp_dec_dev)
         {
             vlc_mutex_lock( &p_owner->lock );
-            *pp_vout = p_owner->p_vout;
+            if ( pp_vout )
+                *pp_vout = p_owner->p_vout;
+            if ( pp_dec_dev )
+                *pp_dec_dev = NULL;
+            vout_device_configuration_t cfg = {
+                .vout = p_owner->p_vout, .fmt = &p_dec->fmt_out.video,
+            };
+            input_resource_GetVoutDecoderDevice( p_owner->p_resource,
+                                                &cfg, order, pp_dec_dev );
             *order = p_owner->vout_order;
             vlc_mutex_unlock( &p_owner->lock );
         }



More information about the vlc-commits mailing list