summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMatthew Heaney <matthewjheaney@google.com>2013-05-31 16:27:32 -0700
committerClément Bœsch <ubitux@gmail.com>2013-06-01 15:12:49 +0200
commit8f75ba9926c6b1377aa746ab4ee53831a395fe41 (patch)
treef3053ea04c03b23ea305852636e10c8fa69e4371 /libavcodec
parent151b4947e5d21c418d5316a6d93b5b03f4be4b86 (diff)
lavf/webvttdec: save cue id and settings as side data
Currently the WebVTT demuxer parses the cues but throws away the cue id (the optional first line of the cue) and cue settings (the optional rendering instructions that follow the timestamp). However, in order to write inband text tracks (to WebM files), the entire cue payload from the WebVTT source must be preserved. This commit makes no change to the data part of the output buffer packet (where the actual cue text is stored), but does add the cue id and settings as a side data items, if they're present in the cue. Existing code that cares only about the data part of the packet can continue to ignore the side data. There are two new packet data type flags, AV_PKT_DATA_WEBVTT_IDENTIFIER and AV_PKT_DATA_WEBVTT_SETTINGS.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h11
-rw-r--r--libavcodec/version.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 93d63e8873..5ece48ce29 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1008,6 +1008,17 @@ enum AVPacketSideDataType {
* by data.
*/
AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
+
+ /**
+ * The optional first identifier line of a WebVTT cue.
+ */
+ AV_PKT_DATA_WEBVTT_IDENTIFIER,
+
+ /**
+ * The optional settings (rendering instructions) that immediately
+ * follow the timestamp specifier of a WebVTT cue.
+ */
+ AV_PKT_DATA_WEBVTT_SETTINGS,
};
/**
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b904048c23..4c2c21b7f6 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR 12
-#define LIBAVCODEC_VERSION_MICRO 102
+#define LIBAVCODEC_VERSION_MINOR 13
+#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \