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
63#ifndef FF_API_VIDEO_OLD63#ifndef FF_API_VIDEO_OLD
64#define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)64#define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
65#endif65#endif
66#ifndef FF_API_SUBTITLE_OLD
67#define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
68#endif
66 69
67#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)70#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
68#define AV_TIME_BASE 100000071#define AV_TIME_BASE 1000000
@@ -3590,7 +3593,7 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, · 3521 unmodified lines
3590 int *got_picture_ptr,3593 int *got_picture_ptr,
3591 AVPacket *avpkt);3594 AVPacket *avpkt);
3592 3595
3593#if LIBAVCODEC_VERSION_MAJOR < 533596#if FF_API_SUBTITLE_OLD
3594/* Decode a subtitle message. Return -1 if error, otherwise return the3597/* Decode a subtitle message. Return -1 if error, otherwise return the
3595 * number of bytes used. If no subtitle could be decompressed,3598 * number of bytes used. If no subtitle could be decompressed,
3596 * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */3599 * 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
671 return ret;671 return ret;
672}672}
673 673
674#if LIBAVCODEC_VERSION_MAJOR < 53674#if FF_API_SUBTITLE_OLD
675int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,675int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
676 int *got_sub_ptr,676 int *got_sub_ptr,
677 const uint8_t *buf, int buf_size)677 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