[vlc-devel] [PATCH] resource: allow storing the same vout for later use
Steve Lhomme
robux4 at ycbcr.xyz
Mon Oct 21 15:13:21 CEST 2019
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.
---
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 4830d344837..a0dfbc3a687 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
--
2.17.1
More information about the vlc-devel
mailing list