[vlc-commits] input: constify attachment_demux

Francois Cartegnie git at videolan.org
Wed Jul 20 16:25:03 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jul 19 21:34:59 2016 +0200| [34ed4a63810ede713e72fbc3122105adf2d9c12c] | committer: Francois Cartegnie

input: constify attachment_demux

Used only as demux ref for attachments

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

 src/input/input.c          |   12 +++++++-----
 src/input/input_internal.h |    2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 251c9be..a09f329 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -93,8 +93,9 @@ static void InputGetExtraFiles( input_thread_t *p_input,
                                 int *pi_list, char ***pppsz_list,
                                 const char *psz_access, const char *psz_path );
 
-static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment, demux_t ***ppp_attachment_demux,
-                              int i_new, input_attachment_t **pp_new, demux_t *p_demux );
+static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment,
+                              const demux_t ***ppp_attachment_demux,
+                              int i_new, input_attachment_t **pp_new, const demux_t *p_demux );
 
 #define SLAVE_ADD_NOFLAG    0
 #define SLAVE_ADD_FORCED    (1<<0)
@@ -2583,8 +2584,9 @@ static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta )
     }
 }
 
-static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment, demux_t ***ppp_attachment_demux,
-                              int i_new, input_attachment_t **pp_new, demux_t *p_demux )
+static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment,
+                              const demux_t ***ppp_attachment_demux,
+                              int i_new, input_attachment_t **pp_new, const demux_t *p_demux )
 {
     int i_attachment = *pi_attachment;
     int i;
@@ -2594,7 +2596,7 @@ static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_atta
     if( likely(pp_att) )
     {
         *ppp_attachment = pp_att;
-        demux_t **pp_attdmx = realloc( *ppp_attachment_demux,
+        const demux_t **pp_attdmx = realloc( *ppp_attachment_demux,
                         sizeof(*pp_attdmx) * ( i_attachment + i_new ) );
         if( likely(pp_attdmx) )
         {
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 9ee10e9..e3a5de0 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -120,7 +120,7 @@ struct input_thread_private_t
     /* Input attachment */
     int i_attachment;
     input_attachment_t **attachment;
-    demux_t **attachment_demux;
+    const demux_t **attachment_demux;
 
     /* Main input properties */
 



More information about the vlc-commits mailing list