vlc | branch: master | Steve Lhomme <[email protected]> | Mon Jul 8 10:22:09 2019 +0200| [f3e1d3bbd24260185b615e17ada3d922e0f59063] | committer: Steve Lhomme
decoder device: remove VLC_DECODER_DEVICE_NONE A decoder device should always be associated with a "device" or adapter. If there is none it can be NULL, there's no need for a dummy one. Setting values on a module that failed to load and won't be used is misleading. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3e1d3bbd24260185b615e17ada3d922e0f59063 --- include/vlc_codec.h | 1 - src/input/decoder_helpers.c | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/include/vlc_codec.h b/include/vlc_codec.h index 36d48a6204..6649ef94cc 100644 --- a/include/vlc_codec.h +++ b/include/vlc_codec.h @@ -534,7 +534,6 @@ static inline float decoder_GetDisplayRate( decoder_t *dec ) /** Decoder device type */ enum vlc_decoder_device_type { - VLC_DECODER_DEVICE_NONE, VLC_DECODER_DEVICE_VAAPI, VLC_DECODER_DEVICE_VDPAU, VLC_DECODER_DEVICE_DXVA2, diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c index ed13fc9878..f3784e6dfb 100644 --- a/src/input/decoder_helpers.c +++ b/src/input/decoder_helpers.c @@ -114,26 +114,11 @@ struct vlc_decoder_device_priv static int decoder_device_Open(void *func, bool forced, va_list ap) { + VLC_UNUSED(forced); vlc_decoder_device_Open open = func; vlc_decoder_device *device = va_arg(ap, vlc_decoder_device *); vout_window_t *window = va_arg(ap, vout_window_t *); - int ret = open(device, window); - if (ret != VLC_SUCCESS) - { - struct vlc_decoder_device_priv *priv = - container_of(device, struct vlc_decoder_device_priv, device); - - vlc_objres_clear(VLC_OBJECT(&priv->device)); - device->sys = NULL; - device->type = VLC_DECODER_DEVICE_NONE; - device->opaque = NULL; - } - else - { - assert(device->type != VLC_DECODER_DEVICE_NONE); - } - (void) forced; - return ret; + return open(device, window); } vlc_decoder_device * _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
