[vlc-commits] resource: allow storing the same vout for later use

Steve Lhomme git at videolan.org
Wed Oct 23 11:25:33 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Oct 21 15:07:57 2019 +0200| [0a8ac4a91392049249ab293e63a43f79523c898e] | committer: Steve Lhomme

resource: allow storing the same vout for later use

The free vout will be saved for later use when the decoder is destroyed. Until
then it is known internally to the decoder and can be stored for later use as
many times as starting the display thread/module will fail.

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

 src/input/resource.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index 4830d34483..a0dfbc3a68 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -335,7 +335,7 @@ static void input_resource_PutVoutLocked(input_resource_t *p_resource,
     {
         vlc_mutex_unlock(&p_resource->lock_hold);
 
-        assert(p_resource->p_vout_free == NULL);
+        assert(p_resource->p_vout_free == NULL || p_resource->p_vout_free == vout);
         msg_Dbg(p_resource->p_parent, "saving a free vout");
         p_resource->p_vout_free = vout;
     }
@@ -418,7 +418,7 @@ vout_thread_t *input_resource_GetVoutDecoderDevice(input_resource_t *p_resource,
         int index;
         TAB_FIND(p_resource->i_vout, p_resource->pp_vout, cfg->vout, index );
         assert(index >= 0);
-        assert(p_resource->p_vout_free == NULL);
+        assert(p_resource->p_vout_free == NULL || p_resource->p_vout_free == cfg->vout);
     }
 #endif
 



More information about the vlc-commits mailing list