[FFmpeg-cvslog] r17047 - in trunk/libavformat: avformat.h options.c

stefano subversion
Sun Feb 8 09:16:40 CET 2009


Author: stefano
Date: Sun Feb  8 09:16:40 2009
New Revision: 17047

Log:
Deprecate av_malloc_format_context() in favor of
avformat_alloc_context(), and drop the old symbol at the next major
bump.

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

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Sun Feb  8 07:35:21 2009	(r17046)
+++ trunk/libavformat/avformat.h	Sun Feb  8 09:16:40 2009	(r17047)
@@ -22,7 +22,7 @@
 #define AVFORMAT_AVFORMAT_H
 
 #define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 25
+#define LIBAVFORMAT_VERSION_MINOR 26
 #define LIBAVFORMAT_VERSION_MICRO  0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -813,12 +813,20 @@ int av_open_input_file(AVFormatContext *
                        AVInputFormat *fmt,
                        int buf_size,
                        AVFormatParameters *ap);
+
+#if LIBAVFORMAT_VERSION_MAJOR < 53
+/**
+ * @deprecated Use avformat_alloc_context() instead.
+ */
+attribute_deprecated AVFormatContext *av_alloc_format_context(void);
+#endif
+
 /**
  * Allocate an AVFormatContext.
  * Can be freed with av_free() but do not forget to free everything you
  * explicitly allocated as well!
  */
-AVFormatContext *av_alloc_format_context(void);
+AVFormatContext *avformat_alloc_context(void);
 
 /**
  * Read packets of a media file to get stream information. This

Modified: trunk/libavformat/options.c
==============================================================================
--- trunk/libavformat/options.c	Sun Feb  8 07:35:21 2009	(r17046)
+++ trunk/libavformat/options.c	Sun Feb  8 09:16:40 2009	(r17047)
@@ -72,7 +72,7 @@ static void avformat_get_context_default
     av_opt_set_defaults(s);
 }
 
-AVFormatContext *av_alloc_format_context(void)
+AVFormatContext *avformat_alloc_context(void)
 {
     AVFormatContext *ic;
     ic = av_malloc(sizeof(AVFormatContext));
@@ -81,3 +81,10 @@ AVFormatContext *av_alloc_format_context
     ic->av_class = &av_format_context_class;
     return ic;
 }
+
+#if LIBAVFORMAT_VERSION_MAJOR < 53
+AVFormatContext *av_alloc_format_context(void)
+{
+    return avformat_alloc_context();
+}
+#endif




More information about the ffmpeg-cvslog mailing list