Skip to content
Snippets Groups Projects
Commit 81729b98 authored by Alexandre Janniaux's avatar Alexandre Janniaux
Browse files

decoder_helpers: clean decoder device objres on failure

objres are used by nvdec when opening the decoder device so clean them
on failure to avoid a leak.
parent 9ad098b4
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,10 @@ static int decoder_device_Open(void *func, bool forced, va_list ap)
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 *);
return open(device, window);
int ret = open(device, window);
if (ret != VLC_SUCCESS)
vlc_objres_clear(&device->obj);
return ret;
}
vlc_decoder_device *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment