From 89103642cbc1659188065ad98c065275360733ca Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Tue, 24 Mar 2015 12:00:41 +0100 Subject: [PATCH] HACK flic: Support seeking to pts = 0 for looped playback --- libavformat/flic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/flic.c b/libavformat/flic.c index 41dfb4f39e..3ca1e761f1 100644 --- a/libavformat/flic.c +++ b/libavformat/flic.c @@ -269,6 +269,13 @@ static int flic_read_seek(AVFormatContext *s, int stream_index, int64_t pos, ts; int index; + if (pts == 0) { + flic->frame_number = 0; + avio_seek(s->pb, s->streams[flic->video_stream_index]->codecpar->extradata_size, SEEK_SET); + + return 0; + } + if (!sti->index_entries || stream_index != flic->video_stream_index) return -1;