From b5a3541da11e8071c06f07c8ab8fc22f3990f24e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 22 Apr 2007 16:23:44 +0000 Subject: [PATCH] fix av_seek_frame_generic() so that it doesnt fail if the requested timestamp is after the last with backward flag Originally committed as revision 8783 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 59ee8df8bb..ddcf09ebb1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1279,7 +1279,7 @@ static int av_seek_frame_generic(AVFormatContext *s, index = av_index_search_timestamp(st, timestamp, flags); - if(index < 0){ + if(index < 0 || index==st->nb_index_entries-1){ int i; AVPacket pkt;