[vlc-devel] [PATCH 10/30] input: resource: get the decoder device before calling vout_Request()
Steve Lhomme
robux4 at ycbcr.xyz
Wed Sep 25 15:30:59 CEST 2019
---
src/input/resource.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/input/resource.c b/src/input/resource.c
index 668da7a06f6..2ad1e0e7fb3 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -426,9 +426,17 @@ vout_thread_t *input_resource_GetVoutHoldDevice(input_resource_t *p_resource,
}
#endif
- vlc_decoder_device *dec_dev = vout_GetDevice(cfg);
+ if (pp_dec_dev)
+ {
+ *pp_dec_dev = vout_GetDevice(cfg);
+ if (*pp_dec_dev == NULL) {
+ input_resource_PutVoutLocked(p_resource, cfg->vout, false);
+ vlc_mutex_unlock(&p_resource->lock);
+ return NULL;
+ }
+ }
- if (vout_Request(cfg, dec_dev, p_resource->p_input)) {
+ if (vout_Request(cfg, pp_dec_dev ? *pp_dec_dev : NULL, p_resource->p_input)) {
input_resource_PutVoutLocked(p_resource, cfg->vout, false);
vlc_mutex_unlock(&p_resource->lock);
return NULL;
--
2.17.1
More information about the vlc-devel
mailing list