[vlc-devel] [PATCH] avcodec: Support hwaccel 1.2
remi at remlab.net
Wed Jul 8 14:46:57 CEST 2015
Le 2015-07-08 15:23, Luca Barbato a écrit :
> On 08/07/15 13:40, Rémi Denis-Courmont wrote:
>> Le 2015-07-08 14:24, Luca Barbato a écrit :
>>> The hwaccel 1.2 can allocate by different means their buffers so
>>> 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
>>> 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
>>> 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.
> There are hwaccels that have their buffers allocated directly and no
> mean to know where, when and how they are allocated.
> How'd you suggest to handle that situation?
I suggest we do change how we "handle that situation". As with
libde265, the handling consists of rejecting the patch and requesting
that decoding library gets fixed.
> The patch seems working as intended.
Yes. Except for the facts that it relies on current implementation
details and breaks (error paths) on other platforms.
More information about the vlc-devel