[FFmpeg-devel] [PATCH 3/4] lavc: add CODEC_CAP_SUBS_NO_TIME_OVERLAP and use it
Marton Balint
cus at passwd.hu
Sun Nov 17 15:15:01 CET 2013
Add CODEC_CAP_SUBS_NO_TIME_OVERLAP for subtitle codecs without support for
overlapping AVSubtitles in time. If a decoder with this flag produces subtitles
with overlapping timestamps and durations, only the later subtitle should be
displayed.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
doc/APIchanges | 4 ++++
libavcodec/avcodec.h | 6 ++++++
libavcodec/libzvbi-teletextdec.c | 2 +-
libavcodec/version.h | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index cb1c33f..10f0060 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2012-10-22
API changes, most recent first:
+2013-11-xx - xxxxxxx - lavc 55.43.101 - avcodec.h
+ Add CODEC_CAP_SUBS_NO_TIME_OVERLAP for subtitle codecs without support for
+ overlapping AVSubtitles in time.
+
2013-11-xx - xxxxxxx - lavu 52.18.0 - mem.h
Move av_fast_malloc() and av_fast_realloc() for libavcodec to libavutil.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 90abdb2..4bd16b5 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -852,6 +852,12 @@ typedef struct RcOverride{
*/
#define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
/**
+ * Subtitle codec has no way to support overlapping AVSubtitles in time.
+ * If a decoder with this flag produces subtitles with overlapping timestamps
+ * and durations, only the later subtitle should be displayed.
+ */
+#define CODEC_CAP_SUBS_NO_TIME_OVERLAP 0x20000000
+/**
* Codec is intra only.
*/
#define CODEC_CAP_INTRA_ONLY 0x40000000
diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c
index bf2dc06..7bcaa48 100644
--- a/libavcodec/libzvbi-teletextdec.c
+++ b/libavcodec/libzvbi-teletextdec.c
@@ -556,7 +556,7 @@ AVCodec ff_libzvbi_teletext_decoder = {
.init = teletext_init_decoder,
.close = teletext_close_decoder,
.decode = teletext_decode_frame,
- .capabilities = CODEC_CAP_DELAY,
+ .capabilities = CODEC_CAP_DELAY | CODEC_CAP_SUBS_NO_TIME_OVERLAP,
.flush = teletext_flush,
.priv_class= &teletext_class,
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index a6ee4cf..8db0270 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 43
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
--
1.8.4
More information about the ffmpeg-devel
mailing list