<html><head></head><body>Hi,<br><br>Handling the video context regardless of the filter type does not seem right. Only video filters should do that.<br><br><div class="gmail_quote">Le 15 novembre 2019 15:51:06 GMT+01:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">For now it's NULL for the first filter as we don't receive it yet.<hr> src/misc/filter_chain.c | 10 ++++++++++<br> 1 file changed, 10 insertions(+)<br><br>diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c<br>index bbf1c19f388..6b309ed7ac3 100644<br>--- a/src/misc/filter_chain.c<br>+++ b/src/misc/filter_chain.c<br>@@ -51,6 +51,7 @@ struct filter_chain_t<br>     chained_filter_t *first, *last; /**< List of filters */<br> <br>     es_format_t fmt_in; /**< Chain input format (constant) */<br>+    vlc_video_context *vctx_in; /**< Chain input video context (set on Reset) */<br>     es_format_t fmt_out; /**< Chain output format (constant) */<br>     bool b_allow_fmt_out_change; /**< Each filter can change the output */<br>     const char *filter_cap; /**< Filter modules capability */<br>@@ -77,6 +78,7 @@ static filter_chain_t *filter_chain_NewInner( vlc_object_t *obj,<br>     chain->first = NULL;<br>     chain->last = NULL;<br>     es_format_Init( &chain->fmt_in, cat, 0 );<br>+    chain->vctx_in = NULL;<br>     es_format_Init( &chain->fmt_out, cat, 0 );<br>     chain->b_allow_fmt_out_change = fmt_out_change;<br>     chain->filter_cap = cap;<br>@@ -196,15 +198,23 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,<br>     filter_t *filter = &chained->filter;<br> <br>     const es_format_t *fmt_in;<br>+    vlc_video_context *vctx_in;<br>     if( chain->last != NULL )<br>+    {<br>         fmt_in = &chain->last->filter.fmt_out;<br>+        vctx_in = chain->last->filter.vctx_out;<br>+    }<br>     else<br>+    {<br>         fmt_in = &chain->fmt_in;<br>+        vctx_in = chain->vctx_in;<br>+    }<br> <br>     if( fmt_out == NULL )<br>         fmt_out = &chain->fmt_out;<br> <br>     es_format_Copy( &filter->fmt_in, fmt_in );<br>+    filter->vctx_in = vctx_in;<br>     es_format_Copy( &filter->fmt_out, fmt_out );<br>     filter->b_allow_fmt_out_change = chain->b_allow_fmt_out_change;<br>     filter->p_cfg = cfg;</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>