[vlc-commits] AVFormat mux: Don't use too new av_guess_format on older ffmpeg.

Konstantin Pavlov git at videolan.org
Wed Apr 20 07:36:20 CEST 2011


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Wed Apr 20 09:27:49 2011 +0400| [c7255099d7a06663df733beaeff4520ae7c77d86] | committer: Konstantin Pavlov

AVFormat mux: Don't use too new av_guess_format on older ffmpeg.

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

 modules/demux/avformat/mux.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 41d4de5..f11c491 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -96,12 +96,20 @@ int OpenMux( vlc_object_t *p_this )
     psz_mux = var_GetNonEmptyString( p_mux, "ffmpeg-mux" );
     if( psz_mux )
     {
+#if( LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( 52, 45, 0 ) )
         file_oformat = av_guess_format( psz_mux, NULL, NULL );
+#else
+        file_oformat = guess_format( psz_mux, NULL, NULL );
+#endif
     }
     else
     {
         file_oformat =
-            av_guess_format(NULL, p_mux->p_access->psz_path, NULL);
+#if( LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( 52, 45, 0 ) )
+            av_guess_format( NULL, p_mux->p_access->psz_path, NULL);
+#else
+            guess_format( NULL, p_mux->p_access->psz_path, NULL);
+#endif
     }
     if (!file_oformat)
     {



More information about the vlc-commits mailing list