summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2010-10-15 12:59:45 +0000
committerAurelien Jacobs <aurel@gnuage.org>2010-10-15 12:59:45 +0000
commitca51d86c96675aabf3f05c9052593b4bc8eb927f (patch)
tree39fbf071b74759f9afa62ca84b307f5f0b3841b0 /libavformat
parent88e44314ea0bbd7b8cec7fe8a3fcab68751ff3ba (diff)
add FF_API_ALLOC_FORMAT_CONTEXT define to disable the deprecated
av_alloc_format_context() public function Originally committed as revision 25483 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h5
-rw-r--r--libavformat/options.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 655488ca95..0354f03a47 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -63,6 +63,9 @@
#ifndef FF_API_URL_SPLIT
#define FF_API_URL_SPLIT (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_ALLOC_FORMAT_CONTEXT
+#define FF_API_ALLOC_FORMAT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
/**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
@@ -1071,7 +1074,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
int buf_size,
AVFormatParameters *ap);
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_ALLOC_FORMAT_CONTEXT
/**
* @deprecated Use avformat_alloc_context() instead.
*/
diff --git a/libavformat/options.c b/libavformat/options.c
index cba6436c29..27eb8da76a 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -89,7 +89,7 @@ AVFormatContext *avformat_alloc_context(void)
return ic;
}
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_ALLOC_FORMAT_CONTEXT
AVFormatContext *av_alloc_format_context(void)
{
return avformat_alloc_context();