<html><head></head><body>Patches seem fine though I haven't checked for any remaining call sites.<br><br><div class="gmail_quote">Le 28 février 2020 16:16:33 GMT+02:00, Thomas Guillem <thomas@gllm.fr> 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"><hr> src/input/es_out.c | 25 ++++++++++---------------<br> src/input/es_out.h | 12 ++++++------<br> src/input/input.c | 2 +-<br> 3 files changed, 17 insertions(+), 22 deletions(-)<br><br>diff --git a/src/input/es_out.c b/src/input/es_out.c<br>index e19cc57a2cf..5dbf5546822 100644<br>--- a/src/input/es_out.c<br>+++ b/src/input/es_out.c<br>@@ -3566,37 +3566,32 @@ static int EsOutVaPrivControlLocked( es_out_t *out, int query, va_list args )<br> foreach_es_then_es_slaves(es)<br> count++;<br> <br>- int *selected_es = vlc_alloc(count + 1, sizeof(int));<br>+ vlc_es_id_t **selected_es = vlc_alloc(count + 1, sizeof(vlc_es_id_t *));<br> if (!selected_es)<br> return VLC_ENOMEM;<br> <br>- *va_arg(args, void **) = selected_es;<br>- *selected_es = count;<br>+ *va_arg(args, vlc_es_id_t ***) = selected_es;<br> <br> foreach_es_then_es_slaves(es)<br> {<br> if (EsIsSelected(es))<br> {<br> EsOutDestroyDecoder(out, es);<br>- *++selected_es = es->fmt.i_id;<br>+ *selected_es++ = vlc_es_id_Hold(&es->id);<br> }<br>- else<br>- *++selected_es = -1;<br>+ *selected_es = NULL;<br> }<br> return VLC_SUCCESS;<br> }<br> case ES_OUT_PRIV_START_ALL_ES:<br> {<br>- int *selected_es = va_arg( args, void * );<br>- int count = selected_es[0];<br>- for( int i = 0; i < count; ++i )<br>+ vlc_es_id_t **selected_es = va_arg( args, vlc_es_id_t ** );<br>+ vlc_es_id_t **selected_es_it = selected_es;<br>+ for( vlc_es_id_t *id = *selected_es_it; id != NULL;<br>+ id = *++selected_es_it )<br> {<br>- int i_id = selected_es[i + 1];<br>- if( i_id != -1 )<br>- {<br>- es_out_id_t *p_es = EsOutGetFromID( out, i_id );<br>- EsOutCreateDecoder( out, p_es );<br>- }<br>+ EsOutCreateDecoder( out, vlc_es_id_get_out( id ) );<br>+ vlc_es_id_Release( id );<br> }<br> free(selected_es);<br> EsOutStopFreeVout( out );<br>diff --git a/src/input/es_out.h b/src/input/es_out.h<br>index 689e10edc36..cc8ce55a6a5 100644<br>--- a/src/input/es_out.h<br>+++ b/src/input/es_out.h<br>@@ -53,11 +53,11 @@ enum es_out_query_private_e<br> <br> ES_OUT_PRIV_SET_ES_CAT_IDS, /* arg1=es_format_category_e arg2=const char *, res=cannot fail */<br> <br>- /* Stop all selected ES and save the stopped state in a context. free the<br>- * context or call ES_OUT_PRIV_STOP_ALL_ES */<br>- ES_OUT_PRIV_STOP_ALL_ES, /* arg1=void ** */<br>+ /* Stop all selected ES and save the stopped state in a context.<br>+ * Call ES_OUT_PRIV_START_ALL_ES to release the context. */<br>+ ES_OUT_PRIV_STOP_ALL_ES, /* arg1=vlc_es_id_t *** */<br> /* Start all ES from the context returned by ES_OUT_PRIV_STOP_ALL_ES */<br>- ES_OUT_PRIV_START_ALL_ES, /* arg1=void * */<br>+ ES_OUT_PRIV_START_ALL_ES, /* arg1=vlc_es_id_t ** */<br> <br> /* Get buffering state */<br> ES_OUT_PRIV_GET_BUFFERING, /* arg1=bool* res=cannot fail */<br>@@ -153,11 +153,11 @@ static inline void es_out_SetEsCatIds( es_out_t *p_out,<br> cat, str_ids );<br> assert( ret == VLC_SUCCESS );<br> }<br>-static inline int es_out_StopAllEs( es_out_t *p_out, void **context )<br>+static inline int es_out_StopAllEs( es_out_t *p_out, vlc_es_id_t ***context )<br> {<br> return es_out_PrivControl( p_out, ES_OUT_PRIV_STOP_ALL_ES, context );<br> }<br>-static inline int es_out_StartAllEs( es_out_t *p_out, void *context )<br>+static inline int es_out_StartAllEs( es_out_t *p_out, vlc_es_id_t **context )<br> {<br> return es_out_PrivControl( p_out, ES_OUT_PRIV_START_ALL_ES, context );<br> }<br>diff --git a/src/input/input.c b/src/input/input.c<br>index 4f8d70a8cae..34f965ed19d 100644<br>--- a/src/input/input.c<br>+++ b/src/input/input.c<br>@@ -2301,7 +2301,7 @@ static bool Control( input_thread_t *p_input,<br> if ( p_item == NULL && p_priv->p_renderer == NULL )<br> break;<br> <br>- void *context;<br>+ vlc_es_id_t **context;<br> if( es_out_StopAllEs( priv->p_es_out_display, &context ) != VLC_SUCCESS )<br> break;<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>