[FFmpeg-cvslog] r24835 - in trunk/libavformat: avformat.h avio.c avio.h

aurel subversion
Thu Aug 19 18:49:08 CEST 2010


Author: aurel
Date: Thu Aug 19 18:49:08 2010
New Revision: 24835

Log:
add FF_API_URL_CLASS define to enable usage of URLContext as a AVClass

Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/avio.c
   trunk/libavformat/avio.h

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Thu Aug 19 16:54:37 2010	(r24834)
+++ trunk/libavformat/avformat.h	Thu Aug 19 18:49:08 2010	(r24835)
@@ -45,6 +45,9 @@
 #ifndef FF_API_OLD_METADATA
 #define FF_API_OLD_METADATA  (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_URL_CLASS
+#define FF_API_URL_CLASS     (LIBAVFORMAT_VERSION_MAJOR >= 53)
+#endif
 
 /**
  * I return the LIBAVFORMAT_VERSION_INT constant.  You got

Modified: trunk/libavformat/avio.c
==============================================================================
--- trunk/libavformat/avio.c	Thu Aug 19 16:54:37 2010	(r24834)
+++ trunk/libavformat/avio.c	Thu Aug 19 18:49:08 2010	(r24835)
@@ -30,7 +30,7 @@
 #include "network.h"
 #endif
 
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if FF_API_URL_CLASS
 /** @name Logging context. */
 /*@{*/
 static const char *urlcontext_to_name(void *ptr)
@@ -109,7 +109,7 @@ static int url_alloc_for_protocol (URLCo
         err = AVERROR(ENOMEM);
         goto fail;
     }
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if FF_API_URL_CLASS
     uc->av_class = &urlcontext_class;
 #endif
     uc->filename = (char *) &uc[1];

Modified: trunk/libavformat/avio.h
==============================================================================
--- trunk/libavformat/avio.h	Thu Aug 19 16:54:37 2010	(r24834)
+++ trunk/libavformat/avio.h	Thu Aug 19 18:49:08 2010	(r24835)
@@ -43,7 +43,7 @@
  * sizeof(URLContext) must not be used outside libav*.
  */
 typedef struct URLContext {
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if FF_API_URL_CLASS
     const AVClass *av_class; ///< information for av_log(). Set by url_open().
 #endif
     struct URLProtocol *prot;



More information about the ffmpeg-cvslog mailing list