[vlc-devel] [PATCH 1/8] decoder: add a flag allowing decoders to use their own picture pool

Rémi Denis-Courmont remi at remlab.net
Mon Jul 27 17:53:52 CEST 2020


Hi,

This seems wrong at least semantically. The decoder owner shouldn't give a damn about any pool that the decoder might handle internally. That's an implementation detail.

Maybe we still need a flag, though I'd rather we split the concerns at the callback level than with flags. But the name and behaviour just don't seem right in any case.

Le 27 juillet 2020 16:45:22 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>---
> include/vlc_codec.h | 3 +++
> src/input/decoder.c | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/include/vlc_codec.h b/include/vlc_codec.h
>index 81c2cb5d142..8ebdc111709 100644
>--- a/include/vlc_codec.h
>+++ b/include/vlc_codec.h
>@@ -114,6 +114,9 @@ struct decoder_t
>     /* Tell the decoder if it is allowed to drop frames */
>     bool                b_frame_drop_allowed;
> 
>+    /* The decoder uses its own picture pool */
>+    bool                b_external_pool;
>+
>     /**
>      * Number of extra (ie in addition to the DPB) picture buffers
>      * needed for decoding.
>diff --git a/src/input/decoder.c b/src/input/decoder.c
>index 99c5f12e12f..d24fa8feb34 100644
>--- a/src/input/decoder.c
>+++ b/src/input/decoder.c
>@@ -428,7 +428,7 @@ static int ModuleThread_UpdateVideoFormat(
>decoder_t *p_dec, vlc_video_context *
> 
>     // configure the new vout
> 
>-    if ( p_owner->out_pool == NULL )
>+    if ( p_owner->out_pool == NULL && !p_dec->b_external_pool )
>     {
>         unsigned dpb_size;
>         switch( p_dec->fmt_in.i_codec )
>-- 
>2.26.2
>
>_______________________________________________
>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/20200727/51e8d8c2/attachment.html>


More information about the vlc-devel mailing list