[vlc-devel] [PATCH] dxva2: return ENOMEM for malloc error

Steve Lhomme robux4 at ycbcr.xyz
Mon Apr 26 06:42:53 UTC 2021


OK but for consistency the code should also be updated in d3d11va and 
vaapi. This way we can tell which code is actually the same (and might 
be factorized).

On 2021-04-21 9:35, Alexandre Janniaux wrote:
> ---
>   modules/codec/avcodec/dxva2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
> index 39a67811d8..f60f97d28c 100644
> --- a/modules/codec/avcodec/dxva2.c
> +++ b/modules/codec/avcodec/dxva2.c
> @@ -213,7 +213,7 @@ static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
>       if (unlikely(pic->context == NULL))
>       {
>           va_surface_Release(va_surface);
> -        return VLC_ENOITEM;
> +        return VLC_ENOMEM;
>       }
>       data[3] = (uint8_t*)DXVA2_PICCONTEXT_FROM_PICCTX(pic->context)->ctx.picsys.surface;
>       return VLC_SUCCESS;
> -- 
> 2.31.1
> 
> _______________________________________________
> 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