<html><head></head><body>I'll change it to test for NULL then. The argument is the same as for GL anyway.<br><br><div class="gmail_quote">Le 18 juillet 2019 08:43:05 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br><br>On 2019-07-17 22:17, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">This moves the decoder device close callback to a dedicated<br>type-specific structure, to avoid type-unsafe variable-arguments<br>vlc_module_unload().<hr> include/vlc_codec.h | 9 +++++++--<br> modules/hw/vaapi/decoder_device.c | 7 ++++++-<br> modules/video_output/opengl/converter_vdpau.c | 5 +++++<br> src/input/decoder_helpers.c | 11 +++--------<br> 4 files changed, 21 insertions(+), 11 deletions(-)<br><br></blockquote><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c<br>index 7384e2bda0..f1ef1bfd20 100644<br>--- a/src/input/decoder_helpers.c<br>+++ b/src/input/decoder_helpers.c<br>@@ -120,13 +120,6 @@ static int decoder_device_Open(void *func, bool forced, va_list ap)<br> return ret;<br> }<br> <br>-static void decoder_device_Close(void *func, va_list ap)<br>-{<br>- vlc_decoder_device_Close close = func;<br>- vlc_decoder_device *device = va_arg(ap, vlc_decoder_device *);<br>- close(device);<br>-}<br>-<br> vlc_decoder_device *<br> vlc_decoder_device_Create(vout_window_t *window)<br> {<br>@@ -145,6 +138,7 @@ vlc_decoder_device_Create(vout_window_t *window)<br> vlc_object_delete(&priv->device);<br> return NULL;<br> }<br>+ assert(priv->device.ops != NULL);<br> vlc_atomic_rc_init(&priv->rc);<br> return &priv->device;<br> }<br>@@ -165,7 +159,8 @@ vlc_decoder_device_Release(vlc_decoder_device *device)<br> container_of(device, struct vlc_decoder_device_priv, device);<br> if (vlc_atomic_rc_dec(&priv->rc))<br> {<br>- vlc_module_unload(priv->module, decoder_device_Close, device);<br>+ assert(device->ops->close != NULL);<br>+ device->ops->close(device);<br></blockquote><br>I'm not sure the VLC_DECODER_DEVICE_NONE decoder device would need a <br>close callback.<br>It is currently unimplemented and IMO it could be removed and replaced <br>by a NULL decoder device. But we have to agree on what we do.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> vlc_objres_clear(VLC_OBJECT(device));<br> vlc_object_delete(device);<br> }<br>-- <br>2.22.0<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>