[FFmpeg-cvslog] mpc: fix seeking to the end

Michael Niedermayer git at videolan.org
Mon Aug 27 05:25:02 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Aug 27 05:01:51 2012 +0200| [4e8b20609201161c81e047e1c4eec30a26952dfd] | committer: Michael Niedermayer

mpc: fix seeking to the end

Fixes Ticket1689

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e8b20609201161c81e047e1c4eec30a26952dfd
---

 libavformat/mpc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index 2ca8dfa..3b818ed 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -198,7 +198,7 @@ static int mpc_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
     uint32_t lastframe;
 
     /* if found, seek there */
-    if (index >= 0){
+    if (index >= 0 && st->index_entries[st->nb_index_entries-1].timestamp >= timestamp - DELAY_FRAMES){
         c->curframe = st->index_entries[index].pos;
         return 0;
     }



More information about the ffmpeg-cvslog mailing list