[vlc-devel] commit: p_memcpy_module is private libvlc data ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun May 4 19:54:03 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sun May  4 20:34:54 2008 +0300| [0a9fffb92ed32d042bc16f76a3c4735d60c6f086]

p_memcpy_module is private libvlc data

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

 include/vlc_main.h  |    2 --
 src/libvlc-common.c |   12 ++++++------
 src/libvlc.h        |    2 ++
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/vlc_main.h b/include/vlc_main.h
index c6af9c2..545eb74 100644
--- a/include/vlc_main.h
+++ b/include/vlc_main.h
@@ -66,8 +66,6 @@ struct libvlc_int_t
     int                    i_verbose;   ///< info messages
     bool             b_color;     ///< color messages?
 
-    module_t *             p_memcpy_module;  ///< Fast memcpy plugin used
-
     /* Structure storing the action name / key associations */
     struct hotkey
     {
diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index 2e648d4..5df3d8a 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -708,7 +708,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /*
      * Choose the best memcpy module
      */
-    p_libvlc->p_memcpy_module = module_Need( p_libvlc, "memcpy", "$memcpy", 0 );
+    priv->p_memcpy_module = module_Need( p_libvlc, "memcpy", "$memcpy", 0 );
 
     priv->b_stats = config_GetInt( p_libvlc, "stats" ) > 0;
     priv->i_timers = 0;
@@ -747,9 +747,9 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     if( !p_libvlc->p_playlist )
     {
         msg_Err( p_libvlc, "playlist initialization failed" );
-        if( p_libvlc->p_memcpy_module != NULL )
+        if( priv->p_memcpy_module != NULL )
         {
-            module_Unneed( p_libvlc, p_libvlc->p_memcpy_module );
+            module_Unneed( p_libvlc, priv->p_memcpy_module );
         }
         module_EndBank( p_libvlc );
         return VLC_EGENERIC;
@@ -1056,10 +1056,10 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
     }
 #endif
 
-    if( p_libvlc->p_memcpy_module )
+    if( priv->p_memcpy_module )
     {
-        module_Unneed( p_libvlc, p_libvlc->p_memcpy_module );
-        p_libvlc->p_memcpy_module = NULL;
+        module_Unneed( p_libvlc, priv->p_memcpy_module );
+        priv->p_memcpy_module = NULL;
     }
 
     /* Free module bank. It is refcounted, so we call this each time  */
diff --git a/src/libvlc.h b/src/libvlc.h
index 4483a12..b0c3d9e 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -176,6 +176,8 @@ typedef struct libvlc_priv_t
     counter_t        **pp_timers;   ///< Array of all timers
     int                i_timers;    ///< Number of timers
     bool               b_stats;     ///< Whether to collect stats
+
+    module_t          *p_memcpy_module;  ///< Fast memcpy plugin used
 } libvlc_priv_t;
 
 static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)




More information about the vlc-devel mailing list