[vlc-devel] [PATCH 1/6] decoder: allow the buffer_new from the decoder to be NULL
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jun 26 07:22:10 CEST 2019
On 2019-06-25 18:30, Rémi Denis-Courmont wrote:
> Le tiistaina 25. kesäkuuta 2019, 16.55.21 EEST Thomas Guillem a écrit :
>> 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.
>
> Then close #22471 as invalid.
>
> But even if modern OSes make allocations fast enough, a pool might still be
> needed for rate limitting.
Yes, that's my main concern here. That's why (in my push branch) I added
a pool in the decoder (owner for now). Otherwise there's a chance of
getting OOM if decoding is too fast to display (raw decoder for example).
If you look at other decoder owners (that the display/playback one)
their 'buffer_new' callback only does a picture_NewFromFormat().
More information about the vlc-devel
mailing list