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

Luca Barbato lu_zero at gentoo.org
Wed Jul 8 14:23:57 CEST 2015


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 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.

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? The patch seems working as
intended.

lu




More information about the vlc-devel mailing list