[FFmpeg-cvslog] avformat/subtitles: check lower bound for duration overlap seeking.
Clément Bœsch
git at videolan.org
Tue Sep 10 21:50:36 CEST 2013
ffmpeg | branch: release/2.0 | Clément Bœsch <u at pkh.me> | Sun Sep 8 09:55:02 2013 +0200| [283e0708777286c5b61d55bc5928a2f6053a7dcb] | committer: Clément Bœsch
avformat/subtitles: check lower bound for duration overlap seeking.
(cherry picked from commit 1ca4bf930bab681a79fb591330043675c7cfd798)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=283e0708777286c5b61d55bc5928a2f6053a7dcb
---
libavformat/subtitles.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c
index 11cf1a1..d2eb53c 100644
--- a/libavformat/subtitles.c
+++ b/libavformat/subtitles.c
@@ -120,10 +120,11 @@ int ff_subtitles_queue_seek(FFDemuxSubtitlesQueue *q, AVFormatContext *s, int st
/* look back in the latest subtitles for overlapping subtitles */
ts_selected = q->subs[idx].pts;
for (i = idx - 1; i >= 0; i--) {
+ int64_t pts = q->subs[i].pts;
if (q->subs[i].duration <= 0 ||
(stream_index != -1 && q->subs[i].stream_index != stream_index))
continue;
- if (q->subs[i].pts > ts_selected - q->subs[i].duration)
+ if (pts >= min_ts && pts > ts_selected - q->subs[i].duration)
idx = i;
else
break;
More information about the ffmpeg-cvslog
mailing list