<html><head></head><body>Ok<br><br><div class="gmail_quote">Le 25 octobre 2019 09:35:18 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">A decoder device should always be associated with a "device" or adapter. If<br>there is none it can be NULL, there's no need for a dummy one.<br><br>Setting values on a module that failed to load and won't be used is misleading.<hr> include/vlc_codec.h         |  1 -<br> src/input/decoder_helpers.c | 19 ++-----------------<br> 2 files changed, 2 insertions(+), 18 deletions(-)<br><br>diff --git a/include/vlc_codec.h b/include/vlc_codec.h<br>index 36d48a6204d..6649ef94cc2 100644<br>--- a/include/vlc_codec.h<br>+++ b/include/vlc_codec.h<br>@@ -534,7 +534,6 @@ static inline float decoder_GetDisplayRate( decoder_t *dec )<br> /** Decoder device type */<br> enum vlc_decoder_device_type<br> {<br>-    VLC_DECODER_DEVICE_NONE,<br>     VLC_DECODER_DEVICE_VAAPI,<br>     VLC_DECODER_DEVICE_VDPAU,<br>     VLC_DECODER_DEVICE_DXVA2,<br>diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c<br>index ed13fc98785..f3784e6dfbb 100644<br>--- a/src/input/decoder_helpers.c<br>+++ b/src/input/decoder_helpers.c<br>@@ -114,26 +114,11 @@ struct vlc_decoder_device_priv<br> <br> static int decoder_device_Open(void *func, bool forced, va_list ap)<br> {<br>+    VLC_UNUSED(forced);<br>     vlc_decoder_device_Open open = func;<br>     vlc_decoder_device *device = va_arg(ap, vlc_decoder_device *);<br>     vout_window_t *window = va_arg(ap, vout_window_t *);<br>-    int ret = open(device, window);<br>-    if (ret != VLC_SUCCESS)<br>-    {<br>-        struct vlc_decoder_device_priv *priv =<br>-            container_of(device, struct vlc_decoder_device_priv, device);<br>-<br>-        vlc_objres_clear(VLC_OBJECT(&priv->device));<br>-        device->sys = NULL;<br>-        device->type = VLC_DECODER_DEVICE_NONE;<br>-        device->opaque = NULL;<br>-    }<br>-    else<br>-    {<br>-        assert(device->type != VLC_DECODER_DEVICE_NONE);<br>-    }<br>-    (void) forced;<br>-    return ret;<br>+    return open(device, window);<br> }<br> <br> vlc_decoder_device *</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>