diff --git a/doc/APIchanges b/doc/APIchanges index 381cb65657b4449928b8c2079d535ec67146dad0..5049d2d14941aa8fc72847a9889907f948a9cb23 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,10 @@ libavutil: 2021-04-27 API changes, most recent first: +2021-09-20 - xxxxxxxxxx - lavc 59.9.100 - avcodec.h + Deprecate AVCodecContext.sub_text_format and the corresponding + AVOptions. It is unused since the last major bump. + 2021-09-20 - xxxxxxxxxx - lavc 59.8.100 - avcodec.h codec.h Deprecate AV_CODEC_FLAG_TRUNCATED and AV_CODEC_CAP_TRUNCATED, as they are redundant with parsers. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 1b70a089801c70e58c37c1b59c0aefeb24b84990..7ee8bc2b7cc05a8a16afbff5a0984e0fdda5b711 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1857,13 +1857,14 @@ typedef struct AVCodecContext { */ AVBufferRef *hw_frames_ctx; +#if FF_API_SUB_TEXT_FORMAT /** - * Control the form of AVSubtitle.rects[N]->ass - * - decoding: set by user - * - encoding: unused + * @deprecated unused */ + attribute_deprecated int sub_text_format; #define FF_SUB_TEXT_FMT_ASS 0 +#endif /** * Audio only. The amount of padding (in samples) appended by the encoder to diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index e740112d6a865d05cfcd043dd552471e882a9038..130341a2ec7bc95678a7ee434a116d85756bdf9f 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -368,8 +368,10 @@ static const AVOption avcodec_options[] = { {"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, {"pre_decoder", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_PRE_DECODER}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, {"ignore", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_IGNORE}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, -{"sub_text_format", "set decoded text subtitle format", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS}, 0, 1, S|D, "sub_text_format"}, +#if FF_API_SUB_TEXT_FORMAT +{"sub_text_format", "Deprecated, does nothing", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS}, 0, 1, S|D | AV_OPT_FLAG_DEPRECATED, "sub_text_format"}, {"ass", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS}, INT_MIN, INT_MAX, S|D, "sub_text_format"}, +#endif {"apply_cropping", NULL, OFFSET(apply_cropping), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, V | D }, {"skip_alpha", "Skip processing alpha", OFFSET(skip_alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, V|D }, {"field_order", "Field order", OFFSET(field_order), AV_OPT_TYPE_INT, {.i64 = AV_FIELD_UNKNOWN }, 0, 5, V|D|E, "field_order" }, diff --git a/libavcodec/version.h b/libavcodec/version.h index 0c5c644cda8f6bce90f599e07e9881d8bd2a4fed..e36c9fbac3f7e63c52cfb71a680ab455a8bb2379 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,7 +28,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 59 -#define LIBAVCODEC_VERSION_MINOR 8 +#define LIBAVCODEC_VERSION_MINOR 9 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -84,5 +84,8 @@ #ifndef FF_API_FLAG_TRUNCATED #define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60) #endif +#ifndef FF_API_SUB_TEXT_FORMAT +#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60) +#endif #endif /* AVCODEC_VERSION_H */