[vlc-devel] [vlc-commits] vlc_sout: add sout_StreamControlVa

Rémi Denis-Courmont remi at remlab.net
Wed Jan 31 15:28:04 CET 2018


Le 31 janvier 2018 14:55:50 GMT+02:00, Francois Cartegnie <git at videolan.org> a écrit :
>vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan
>30 19:08:21 2018 +0100| [64d7a03cd76f243677961f742e1dfff7fb9c6613] |
>committer: Francois Cartegnie
>
>vlc_sout: add sout_StreamControlVa
>
>>
>http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=64d7a03cd76f243677961f742e1dfff7fb9c6613
>---
>
> include/vlc_sout.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/include/vlc_sout.h b/include/vlc_sout.h
>index e75bf89f86..6773ebe73b 100644
>--- a/include/vlc_sout.h
>+++ b/include/vlc_sout.h
>@@ -246,6 +246,11 @@ static inline void sout_StreamFlush( sout_stream_t
>*s,
>         s->pf_flush( s, id );
> }
> 
>+static inline int sout_StreamControlVa( sout_stream_t *s, int i_query,
>va_list args )
>+{
>+    return s->pf_control ? s->pf_control( s, i_query, args ) :
>VLC_EGENERIC;
>+}
>+
>static inline int sout_StreamControl( sout_stream_t *s, int i_query,
>... )
> {
>     va_list args;
>@@ -255,7 +260,7 @@ static inline int sout_StreamControl( sout_stream_t
>*s, int i_query, ... )
>     if ( !s->pf_control )
>         i_result = VLC_EGENERIC;
>     else
>-        i_result = s->pf_control( s, i_query, args );
>+        i_result = sout_StreamControlVa( s, i_query, args );
>     va_end( args );
>     return i_result;
> }
>
>_______________________________________________
>vlc-commits mailing list
>vlc-commits at videolan.org
>https://mailman.videolan.org/listinfo/vlc-commits

This makes the if() in non-VA helper redundant, does it not?
-- 
Remi Denis-Courmont


More information about the vlc-devel mailing list