[vlc-devel] [PATCH 1/6] decoder: allow the buffer_new from the decoder to be NULL
Thomas Guillem
thomas at gllm.fr
Tue Jun 25 15:55:21 CEST 2019
On Tue, Jun 25, 2019, at 15:03, Rémi Denis-Courmont wrote:
> Hi,
>
> Ok given that it does not change the current behaviour. But I don't think picture_NewFromFormat() will be a suitable default. In general allocating and freeing a picture every time is too slow, so we will need some sort of pool per decoder.
For info, on linux, on my desktop, it's faster to allocate a 4K picture each time rather than locking/getting/unlocking from a pool.
But I guess results are different on many OSes.
>
> Le 25 juin 2019 14:53:12 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>> Create a picture_t on the fly by default. src/input/decoder_helpers.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
>> index 1c4593db30..7384e2bda0 100644
>> --- a/src/input/decoder_helpers.c
>> +++ b/src/input/decoder_helpers.c
>> @@ -88,6 +88,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
>> picture_t *decoder_NewPicture( decoder_t *dec )
>> {
>> vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
>> + if (dec->cbs->video.buffer_new == NULL)
>> + return picture_NewFromFormat( &dec->fmt_out.video );
>> return dec->cbs->video.buffer_new( dec );
>> }
>
> --
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190625/56f5df18/attachment.html>
More information about the vlc-devel
mailing list