[vlc-commits] resource: do not keep the free vout as free when it's going to be reused
Steve Lhomme
git at videolan.org
Thu Jan 9 10:53:24 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan 7 11:52:00 2020 +0100| [d7a2e18753ba55329272ca438e2a4a890b3c588c] | committer: Steve Lhomme
resource: do not keep the free vout as free when it's going to be reused
Calling input_resource_GetVoutDecoderDevice() with a known vout means it's
going to be used and thus it's not free anymore.
This prevents the es_out to release the vout when the decoder has actually
reused it.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d7a2e18753ba55329272ca438e2a4a890b3c588c
---
src/input/resource.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/input/resource.c b/src/input/resource.c
index a0dfbc3a68..4ff6edd79c 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -410,6 +410,9 @@ vout_thread_t *input_resource_GetVoutDecoderDevice(input_resource_t *p_resource,
assert(p_resource->i_vout > 0);
*order = p_resource->pp_vout[0] == cfg->vout ? VLC_VOUT_ORDER_PRIMARY
: VLC_VOUT_ORDER_SECONDARY;
+ /* the caller is going to reuse the free vout, it's not free anymore */
+ if (p_resource->p_vout_free == cfg->vout)
+ p_resource->p_vout_free = NULL;
vlc_mutex_unlock(&p_resource->lock_hold);
}
More information about the vlc-commits
mailing list