[vlc-devel] [PATCH] decoder_helpers: release the resources the decoder device may have created
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jun 7 17:34:46 CEST 2019
On 2019-06-07 16:28, Rémi Denis-Courmont wrote:
> No objection. Though in hindsight, the resource system was not exactly a
> great success. Do we have an actual decoder user yet?
I know there are some already created, not sure they are used (Linux).
I created a D3D11 one and using it to create the display module (also
handles external rendering). Once I have D3D9 I'll probably push it as
its usable even without push.
> Le 7 juin 2019 16:49:15 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>
> Otherwise it leaks or asserts.
> ------------------------------------------------------------------------
> src/input/decoder_helpers.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
> index 3d1c574cb7..1c4593db30 100644
> --- a/src/input/decoder_helpers.c
> +++ b/src/input/decoder_helpers.c
> @@ -31,6 +31,7 @@
> #include <vlc_atomic.h>
> #include <vlc_meta.h>
> #include <vlc_modules.h>
> +#include "libvlc.h"
>
> void decoder_Init( decoder_t *p_dec, const es_format_t *restrict p_fmt )
> {
> @@ -138,6 +139,7 @@ vlc_decoder_device_Create(vout_window_t *window)
> free(name);
> if (!priv->module)
> {
> + vlc_objres_clear(VLC_OBJECT(&priv->device));
> vlc_object_delete(&priv->device);
> return NULL;
> }
> @@ -162,6 +164,7 @@ vlc_decoder_device_Release(vlc_decoder_device *device)
> if (vlc_atomic_rc_dec(&priv->rc))
> {
> vlc_module_unload(priv->module, decoder_device_Close, device);
> + vlc_objres_clear(VLC_OBJECT(device));
> vlc_object_delete(device);
> }
> }
>
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser
> ma brièveté.
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list