From a17a7661906ba295d67afd80ac0770422e1b02b3 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 14 Oct 2015 11:33:25 +0200 Subject: lavc: Add data and linesize to AVSubtitleRect Use the new fields directly instead of the ones from AVPicture. This removes a layer of indirection which serves no pratical purpose whatsoever, and will help in removing AVPicture structure completely later. Every subtitle encoder/decoder seamlessly points to the new arrays, so it is possible to deprecate AVSubtitleRect.pict. Signed-off-by: Vittorio Giovara --- libavcodec/avcodec.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'libavcodec/avcodec.h') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 5f1755a3ea..42f90d5c70 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3215,11 +3215,20 @@ typedef struct AVSubtitleRect { int h; ///< height of pict, undefined when pict is not set int nb_colors; ///< number of colors in pict, undefined when pict is not set +#if FF_API_AVPICTURE /** - * data+linesize for the bitmap of this subtitle. - * can be set for text/ass as well once they where rendered + * @deprecated unused */ + attribute_deprecated AVPicture pict; +#endif + /** + * data+linesize for the bitmap of this subtitle. + * Can be set for text/ass as well once they are rendered. + */ + uint8_t *data[4]; + int linesize[4]; + enum AVSubtitleType type; char *text; ///< 0 terminated plain UTF-8 text -- cgit v1.2.3