[vlc-commits] avformat: rename OpenDemux/CloseDemux functions

Thomas Guillem git at videolan.org
Sat Nov 11 11:02:03 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 10:49:04 2017 +0100| [5317a381a3f66db061a5ff5e4f18002d56214fe1] | committer: Thomas Guillem

avformat: rename OpenDemux/CloseDemux functions

This fixes duplicate symbols with a static build.

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

 modules/demux/avformat/avformat.c |  4 ++--
 modules/demux/avformat/avformat.h |  8 ++++----
 modules/demux/avformat/demux.c    | 16 ++++++++--------
 modules/demux/avformat/mux.c      |  4 ++--
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/modules/demux/avformat/avformat.c b/modules/demux/avformat/avformat.c
index 28c5a7df76..8025a898b6 100644
--- a/modules/demux/avformat/avformat.c
+++ b/modules/demux/avformat/avformat.c
@@ -41,7 +41,7 @@ vlc_module_begin ()
     set_description( N_("Avformat demuxer" ) )
     set_shortname( N_("Avformat") )
     set_capability( "demux", 2 )
-    set_callbacks( OpenDemux, CloseDemux )
+    set_callbacks( avformat_OpenDemux, avformat_CloseDemux )
     set_section( N_("Demuxer"), NULL )
     add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT, true )
     add_obsolete_string("ffmpeg-format") /* removed since 2.1.0 */
@@ -57,7 +57,7 @@ vlc_module_begin ()
     add_string( "sout-avformat-mux", NULL, MUX_TEXT, MUX_LONGTEXT, true )
     add_obsolete_string("ffmpeg-mux") /* removed since 2.1.0 */
     add_string( "sout-avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
-    set_callbacks( OpenMux, CloseMux )
+    set_callbacks( avformat_OpenMux, avformat_CloseMux )
 #endif
 #ifndef MERGE_FFMPEG
 vlc_module_end ()
diff --git a/modules/demux/avformat/avformat.h b/modules/demux/avformat/avformat.h
index 5105dd1efd..c7cc3e83a4 100644
--- a/modules/demux/avformat/avformat.h
+++ b/modules/demux/avformat/avformat.h
@@ -25,12 +25,12 @@ void LibavcodecCallback( void *p_opaque, int i_level,
                              const char *psz_format, va_list va );
 
 /* Demux module */
-int  OpenDemux ( vlc_object_t * );
-void CloseDemux( vlc_object_t * );
+int  avformat_OpenDemux ( vlc_object_t * );
+void avformat_CloseDemux( vlc_object_t * );
 
 /* Mux module */
-int  OpenMux ( vlc_object_t * );
-void CloseMux( vlc_object_t * );
+int  avformat_OpenMux ( vlc_object_t * );
+void avformat_CloseMux( vlc_object_t * );
 
 #define MUX_TEXT N_("Avformat mux")
 #define MUX_LONGTEXT N_("Force use of a specific avformat muxer.")
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index d53d15565d..aa5f406fbc 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -148,7 +148,7 @@ static void get_rotation(es_format_t *fmt, AVStream *s)
     }
 }
 
-int OpenDemux( vlc_object_t *p_this )
+int avformat_OpenDemux( vlc_object_t *p_this )
 {
     demux_t       *p_demux = (demux_t*)p_this;
     demux_sys_t   *p_sys;
@@ -288,7 +288,7 @@ int OpenDemux( vlc_object_t *p_this )
     if( !p_io_buffer )
     {
         free( psz_url );
-        CloseDemux( p_this );
+        avformat_CloseDemux( p_this );
         return VLC_ENOMEM;
     }
 
@@ -297,7 +297,7 @@ int OpenDemux( vlc_object_t *p_this )
     {
         av_free( p_io_buffer );
         free( psz_url );
-        CloseDemux( p_this );
+        avformat_CloseDemux( p_this );
         return VLC_ENOMEM;
     }
 
@@ -307,7 +307,7 @@ int OpenDemux( vlc_object_t *p_this )
     {
         av_free( p_io_buffer );
         free( psz_url );
-        CloseDemux( p_this );
+        avformat_CloseDemux( p_this );
         return VLC_ENOMEM;
     }
 
@@ -322,7 +322,7 @@ int OpenDemux( vlc_object_t *p_this )
         av_free( pb );
         p_sys->ic = NULL;
         free( psz_url );
-        CloseDemux( p_this );
+        avformat_CloseDemux( p_this );
         return VLC_EGENERIC;
     }
     free( psz_url );
@@ -357,13 +357,13 @@ int OpenDemux( vlc_object_t *p_this )
     if( !nb_streams )
     {
         msg_Err( p_demux, "No streams found");
-        CloseDemux( p_this );
+        avformat_CloseDemux( p_this );
         return VLC_EGENERIC;
     }
     p_sys->tracks = calloc( nb_streams, sizeof(*p_sys->tracks) );
     if( !p_sys->tracks )
     {
-        CloseDemux( p_this );
+        avformat_CloseDemux( p_this );
         return VLC_ENOMEM;
     }
 
@@ -697,7 +697,7 @@ int OpenDemux( vlc_object_t *p_this )
 /*****************************************************************************
  * Close
  *****************************************************************************/
-void CloseDemux( vlc_object_t *p_this )
+void avformat_CloseDemux( vlc_object_t *p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index f0affe0c2a..494cadc182 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -84,7 +84,7 @@ static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
 /*****************************************************************************
  * Open
  *****************************************************************************/
-int OpenMux( vlc_object_t *p_this )
+int avformat_OpenMux( vlc_object_t *p_this )
 {
     AVOutputFormat *file_oformat;
     sout_mux_t *p_mux = (sout_mux_t*)p_this;
@@ -163,7 +163,7 @@ int OpenMux( vlc_object_t *p_this )
 /*****************************************************************************
  * Close
  *****************************************************************************/
-void CloseMux( vlc_object_t *p_this )
+void avformat_CloseMux( vlc_object_t *p_this )
 {
     sout_mux_t *p_mux = (sout_mux_t*)p_this;
     sout_mux_sys_t *p_sys = p_mux->p_sys;



More information about the vlc-commits mailing list