[vlc-commits] avcodec: rename entry functions

Thomas Guillem git at videolan.org
Thu Feb 1 15:10:28 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb  1 15:02:31 2018 +0100| [cac8a19e6817e5696fdd90d50a9095879a726e52] | committer: Thomas Guillem

avcodec: rename entry functions

This fixes duplicate symbols with a static build.

(cherry picked from commit c6e4f5695706bffbbff2afbd2bd00ee23dc7e6b2)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/codec/avcodec/avcodec.c |  2 +-
 modules/codec/avcodec/avcodec.h |  4 ++--
 modules/codec/avcodec/encoder.c | 11 ++++-------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index ddc5ab562a..9325b1fb0e 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -147,7 +147,7 @@ vlc_module_begin ()
     set_section( N_("Encoding") , NULL )
     set_description( N_("FFmpeg audio/video encoder") )
     set_capability( "encoder", 100 )
-    set_callbacks( OpenEncoder, CloseEncoder )
+    set_callbacks( InitVideoEnc, EndVideoEnc )
 
     /* removed in 2.1.0 */
     add_obsolete_string( "sout-ffmpeg-codec" )
diff --git a/modules/codec/avcodec/avcodec.h b/modules/codec/avcodec/avcodec.h
index f64fc55cc5..52e522dc32 100644
--- a/modules/codec/avcodec/avcodec.h
+++ b/modules/codec/avcodec/avcodec.h
@@ -31,8 +31,8 @@ vlc_fourcc_t GetVlcFourcc( unsigned i_ffmpeg_codec );
 vlc_fourcc_t GetVlcAudioFormat( int i_sample_fmt );
 
 /* Video encoder module */
-int  OpenEncoder ( vlc_object_t * );
-void CloseEncoder( vlc_object_t * );
+int  InitVideoEnc ( vlc_object_t * );
+void EndVideoEnc( vlc_object_t * );
 
 /* Video Decoder */
 int InitVideoDec( vlc_object_t * );
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 3805066975..df8f663b86 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -63,9 +63,6 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-int  OpenEncoder ( vlc_object_t * );
-void CloseEncoder( vlc_object_t * );
-
 static block_t *EncodeVideo( encoder_t *, picture_t * );
 static block_t *EncodeAudio( encoder_t *, block_t * );
 
@@ -235,7 +232,7 @@ static const int DEFAULT_ALIGN = 0;
 
 
 /*****************************************************************************
- * OpenEncoder: probe the encoder
+ * InitVideoEnc: probe the encoder
  *****************************************************************************/
 static void probe_video_frame_rate( encoder_t *p_enc, AVCodecContext *p_context, AVCodec *p_codec )
 {
@@ -294,7 +291,7 @@ static void add_av_option_float( encoder_t *p_enc, AVDictionary** pp_dict, const
         msg_Warn( p_enc, "Failed to set encoder option %s", psz_name );
 }
 
-int OpenEncoder( vlc_object_t *p_this )
+int InitVideoEnc( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
     encoder_sys_t *p_sys;
@@ -1421,9 +1418,9 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
 }
 
 /*****************************************************************************
- * CloseEncoder: libavcodec encoder destruction
+ * EndVideoEnc: libavcodec encoder destruction
  *****************************************************************************/
-void CloseEncoder( vlc_object_t *p_this )
+void EndVideoEnc( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
     encoder_sys_t *p_sys = p_enc->p_sys;



More information about the vlc-commits mailing list