[vlc-commits] declare private options only if they are used

Rafaël Carré git at videolan.org
Tue Apr 17 14:50:45 CEST 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Apr 17 08:50:23 2012 -0400| [39eaf8e0480f66680617d480e46d83415cab4d45] | committer: Rafaël Carré

declare private options only if they are used

avoid confusing old versions of ffmpeg

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

 modules/demux/avformat/avformat.c |    4 ++++
 modules/stream_out/switcher.c     |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/demux/avformat/avformat.c b/modules/demux/avformat/avformat.c
index de3e9b2..1b4b07b 100644
--- a/modules/demux/avformat/avformat.c
+++ b/modules/demux/avformat/avformat.c
@@ -44,7 +44,9 @@ vlc_module_begin ()
     set_callbacks( OpenDemux, CloseDemux )
     add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT, true )
     add_obsolete_string("ffmpeg-format") /* removed since 2.1.0 */
+#if LIBAVFORMAT_VERSION_INT >= ((53<<16)+(26<<8)+0)
     add_string( "avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
+#endif
 
 #ifdef ENABLE_SOUT
     /* mux submodule */
@@ -54,7 +56,9 @@ vlc_module_begin ()
     set_capability( "sout mux", 2 )
     add_string( "sout-avformat-mux", NULL, MUX_TEXT, MUX_LONGTEXT, true )
     add_obsolete_string("ffmpeg-mux") /* removed since 2.1.0 */
+#if (LIBAVFORMAT_VERSION_INT >= ((53<<16)+(2<<8)+0))
     add_string( "sout-avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
+#endif
     set_callbacks( OpenMux, CloseMux )
 #endif
 #ifndef MERGE_FFMPEG
diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c
index 796a37b..b2a1586 100644
--- a/modules/stream_out/switcher.c
+++ b/modules/stream_out/switcher.c
@@ -131,8 +131,10 @@ vlc_module_begin ()
                  QSCALE_TEXT, QSCALE_LONGTEXT, true )
     add_bool( SOUT_CFG_PREFIX "mute-audio", true,
               AUDIO_TEXT, AUDIO_LONGTEXT, true )
+#if LIBAVCODEC_VERSION_MAJOR >= 54
     add_string( SOUT_CFG_PREFIX "options", NULL,
                 AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
+#endif
 vlc_module_end ()
 
 static const char *const ppsz_sout_options[] = {



More information about the vlc-commits mailing list