From bad4e112a24a5c857120c7a7b3bff9a304f6acaa Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Fri, 23 Nov 2012 21:43:54 +0100 Subject: lavf: use ff_subtitles_queue_seek() for text subtitles demuxers. --- libavformat/samidec.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavformat/samidec.c') diff --git a/libavformat/samidec.c b/libavformat/samidec.c index 5f29364028..85fd220f4a 100644 --- a/libavformat/samidec.c +++ b/libavformat/samidec.c @@ -112,6 +112,14 @@ static int sami_read_packet(AVFormatContext *s, AVPacket *pkt) return ff_subtitles_queue_read_packet(&sami->q, pkt); } +static int sami_read_seek(AVFormatContext *s, int stream_index, + int64_t min_ts, int64_t ts, int64_t max_ts, int flags) +{ + SAMIContext *sami = s->priv_data; + return ff_subtitles_queue_seek(&sami->q, s, stream_index, + min_ts, ts, max_ts, flags); +} + static int sami_read_close(AVFormatContext *s) { SAMIContext *sami = s->priv_data; @@ -126,6 +134,7 @@ AVInputFormat ff_sami_demuxer = { .read_probe = sami_probe, .read_header = sami_read_header, .read_packet = sami_read_packet, + .read_seek2 = sami_read_seek, .read_close = sami_read_close, .flags = AVFMT_GENERIC_INDEX, .extensions = "smi,sami", -- cgit v1.2.3