[vlc-devel] [PATCH 1/6] decoder: allow the buffer_new from the decoder to be NULL

Rémi Denis-Courmont remi at remlab.net
Tue Jun 25 15:02:59 CEST 2019


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.

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 );
> }
> 
>-- 
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190625/4f07b302/attachment.html>


More information about the vlc-devel mailing list