aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-06-15 13:26:52 +0000
committerMåns Rullgård <mans@mansr.com>2010-06-15 13:26:52 +0000
commitb462d13262f1a1d88c08981a742355f7c99c1959 (patch)
tree5975423b6f838804962318ef2b6ffd7c103a0dbe /libavformat/utils.c
parent2661d65a5f7ab81d4b048dd3e92db192e8ef97f2 (diff)
downloadffmpeg-b462d13262f1a1d88c08981a742355f7c99c1959.tar.gz
Add compatibility wrappers for functions moved from lavf to lavc
When symbol versioning is enabled, moving symbols from one library to another breaks binary compatibility. This adds wrappers with the old version tag for the av_*packet functions recently moved to lavc. Originally committed as revision 23611 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6365f3e33e..9faa566a8c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -283,8 +283,38 @@ AVInputFormat *av_find_input_format(const char *short_name)
return NULL;
}
-/* memory handling */
+#if LIBAVFORMAT_VERSION_MAJOR < 53 && CONFIG_SHARED && HAVE_SYMVER
+FF_SYMVER(void, av_destruct_packet_nofree, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+ av_destruct_packet_nofree(pkt);
+}
+
+FF_SYMVER(void, av_destruct_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+ av_destruct_packet(pkt);
+}
+
+FF_SYMVER(int, av_new_packet, (AVPacket *pkt, int size), "LIBAVFORMAT_52")
+{
+ return av_new_packet(pkt, size);
+}
+
+FF_SYMVER(int, av_dup_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+ return av_dup_packet(pkt);
+}
+
+FF_SYMVER(void, av_free_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+ av_free_packet(pkt);
+}
+FF_SYMVER(void, av_init_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+ av_log(NULL, AV_LOG_WARNING, "Diverting av_*_packet function calls to libavcodec. Recompile to improve performance\n");
+ av_init_packet(pkt);
+}
+#endif
int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size)
{