[SCM] libav/experimental: add FF_API_URL_CLASS define to enable usage of URLContext as a AVClass

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:14:15 UTC 2013


The following commit has been merged in the experimental branch:
commit 404eba44b162cb583a47538376e4ca3e502b912f
Author: Aurelien Jacobs <aurel at gnuage.org>
Date:   Thu Aug 19 16:49:08 2010 +0000

    add FF_API_URL_CLASS define to enable usage of URLContext as a AVClass
    
    Originally committed as revision 24835 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 072845a..f49c842 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 0e9e887..f19cb29 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -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 (URLContext **puc, struct URLProtocol *up,
         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];
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 3df9fad..2b7a9c5 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list