[vlc-devel] [PATCH] avcodec: Support hwaccel 1.2

Rémi Denis-Courmont remi at remlab.net
Wed Jul 8 13:40:35 CEST 2015


Le 2015-07-08 14:24, Luca Barbato a écrit :
> The hwaccel 1.2 can allocate by different means their buffers so the
> get_buffer2 callback will not be called.
>
> Unbreaks VDA decoding.
> ---
>  modules/codec/avcodec/video.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/modules/codec/avcodec/video.c 
> b/modules/codec/avcodec/video.c
> index c84ecb9..faeba88 100644
> --- a/modules/codec/avcodec/video.c
> +++ b/modules/codec/avcodec/video.c
> @@ -775,8 +775,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec,
> block_t **pp_block )
>          if( p_pic == NULL )
>          {
>              /* Get a new picture */
> -            if( p_sys->p_va == NULL )
> -                p_pic = ffmpeg_NewPictBuf( p_dec, p_context );
> +            p_pic = ffmpeg_NewPictBuf( p_dec, p_context );

By design, vlc_va_Get() MUST be called BEFORE decoding the frame.

So this is wrong.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list