[SCM] libav/experimental: add FF_API_SUBTITLE_OLD define to disable the deprecated decode_subtitle API
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:16:40 UTC 2013
The following commit has been merged in the experimental branch:
commit 448ce9258c145dfe17a4616d15677f412bef7304
Author: Aurelien Jacobs <aurel at gnuage.org>
Date: Thu Sep 30 20:12:46 2010 +0000
add FF_API_SUBTITLE_OLD define to disable the deprecated decode_subtitle API
Originally committed as revision 25273 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 880ce5a..e2e4d9d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -63,6 +63,9 @@
#ifndef FF_API_VIDEO_OLD
#define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_SUBTITLE_OLD
+#define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
+#endif
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
#define AV_TIME_BASE 1000000
@@ -3590,7 +3593,7 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
AVPacket *avpkt);
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_SUBTITLE_OLD
/* Decode a subtitle message. Return -1 if error, otherwise return the
* number of bytes used. If no subtitle could be decompressed,
* got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0d27163..ffd34ee 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -671,7 +671,7 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
return ret;
}
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_SUBTITLE_OLD
int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
int *got_sub_ptr,
const uint8_t *buf, int buf_size)
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list