[vlc-commits] duplicate: log error to VLC log, not stderr

Rémi Denis-Courmont git at videolan.org
Sun Oct 11 21:23:26 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 11 22:20:22 2020 +0300| [1f38cbdda2401777af4cc63c689b55a097f5018c] | committer: Rémi Denis-Courmont

duplicate: log error to VLC log, not stderr

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f38cbdda2401777af4cc63c689b55a097f5018c
---

 modules/stream_out/duplicate.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/stream_out/duplicate.c b/modules/stream_out/duplicate.c
index 730f46bc85..21fbbfbe1f 100644
--- a/modules/stream_out/duplicate.c
+++ b/modules/stream_out/duplicate.c
@@ -78,7 +78,8 @@ typedef struct
     void                **pp_ids;
 } sout_stream_id_sys_t;
 
-static bool ESSelected( const es_format_t *fmt, char *psz_select );
+static bool ESSelected( struct vlc_logger *, const es_format_t *fmt,
+                        char *psz_select );
 
 /*****************************************************************************
  * Control
@@ -229,7 +230,8 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
     {
         void *id_new = NULL;
 
-        if( ESSelected( p_fmt, p_sys->ppsz_select[i_stream] ) )
+        if( ESSelected( p_stream->obj.logger, p_fmt,
+                        p_sys->ppsz_select[i_stream] ) )
         {
             sout_stream_t *out = p_sys->pp_streams[i_stream];
 
@@ -345,7 +347,8 @@ static bool NumInRange( const char *psz_range, int i_num )
         || (beginRange > endRange && (i_num <= beginRange && i_num >= endRange));
 }
 
-static bool ESSelected( const es_format_t *fmt, char *psz_select )
+static bool ESSelected( struct vlc_logger *logger, const es_format_t *fmt,
+                        char *psz_select )
 {
     char  *psz_dup;
     char  *psz;
@@ -476,7 +479,7 @@ static bool ESSelected( const es_format_t *fmt, char *psz_select )
         }
         else
         {
-            fprintf( stderr, "unknown args (%s)\n", psz );
+            vlc_error( logger, "unknown args (%s)", psz );
         }
         /* Next */
         psz = p;



More information about the vlc-commits mailing list