Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-11-24 00:43:54 +0400
committerClément Bœsch <ubitux@gmail.com>2012-12-02 03:06:03 +0400
commitbad4e112a24a5c857120c7a7b3bff9a304f6acaa (patch)
tree2b7e6eeff24abf49b7ac04b3bd147c565ba2997c /libavformat/webvttdec.c
parentad5d72b1235a58442c231c3e9b8d78fc4e7b422e (diff)
lavf: use ff_subtitles_queue_seek() for text subtitles demuxers.
Diffstat (limited to 'libavformat/webvttdec.c')
-rw-r--r--libavformat/webvttdec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
index aeb705095f..7288e8f2ff 100644
--- a/libavformat/webvttdec.c
+++ b/libavformat/webvttdec.c
@@ -168,6 +168,14 @@ static int webvtt_read_packet(AVFormatContext *s, AVPacket *pkt)
return ff_subtitles_queue_read_packet(&webvtt->q, pkt);
}
+static int webvtt_read_seek(AVFormatContext *s, int stream_index,
+ int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
+{
+ WebVTTContext *webvtt = s->priv_data;
+ return ff_subtitles_queue_seek(&webvtt->q, s, stream_index,
+ min_ts, ts, max_ts, flags);
+}
+
static int webvtt_read_close(AVFormatContext *s)
{
WebVTTContext *webvtt = s->priv_data;
@@ -182,6 +190,7 @@ AVInputFormat ff_webvtt_demuxer = {
.read_probe = webvtt_probe,
.read_header = webvtt_read_header,
.read_packet = webvtt_read_packet,
+ .read_seek2 = webvtt_read_seek,
.read_close = webvtt_read_close,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "vtt",