History

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

Aurelien Jacobs committed 16 years ago

Commit 448ce921 parent 164bc382 files · +5 −2Browse files

Unified · Split

2 files
  1. libavcodec/avcodec.h +4 −1
  2. libavcodec/utils.c +1 −1
libavcodec/avcodec.h+4−1
@@ -63,6 +63,9 @@ · 62 unmodified lines
6363 #ifndef FF_API_VIDEO_OLD
6464 #define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
6565 #endif
66+#ifndef FF_API_SUBTITLE_OLD
67+#define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
68+#endif
6669
6770 #define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
6871 #define AV_TIME_BASE 1000000
@@ -3590,7 +3593,7 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, · 3521 unmodified lines
35903593 int *got_picture_ptr,
35913594 AVPacket *avpkt);
35923595
3593−#if LIBAVCODEC_VERSION_MAJOR < 53
3596+#if FF_API_SUBTITLE_OLD
35943597 /* Decode a subtitle message. Return -1 if error, otherwise return the
35953598 * number of bytes used. If no subtitle could be decompressed,
35963599 * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
libavcodec/utils.c+1−1
@@ -671,7 +671,7 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa · 670 unmodified lines
671671 return ret;
672672 }
673673
674−#if LIBAVCODEC_VERSION_MAJOR < 53
674+#if FF_API_SUBTITLE_OLD
675675 int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
676676 int *got_sub_ptr,
677677 const uint8_t *buf, int buf_size)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t