[FFmpeg-cvslog] r25273 - in trunk/libavcodec: avcodec.h utils.c

aurel subversion
Thu Sep 30 22:12:46 CEST 2010


Author: aurel
Date: Thu Sep 30 22:12:46 2010
New Revision: 25273

Log:
add FF_API_SUBTITLE_OLD define to disable the deprecated decode_subtitle API

Modified:
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	Thu Sep 30 21:51:22 2010	(r25272)
+++ trunk/libavcodec/avcodec.h	Thu Sep 30 22:12:46 2010	(r25273)
@@ -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
                          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. */

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Thu Sep 30 21:51:22 2010	(r25272)
+++ trunk/libavcodec/utils.c	Thu Sep 30 22:12:46 2010	(r25273)
@@ -671,7 +671,7 @@ int attribute_align_arg avcodec_decode_a
     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)



More information about the ffmpeg-cvslog mailing list