matroskadec: don't try to seek to negative timestamp
authorAurelien Jacobs <aurel@gnuage.org>
Sun, 24 Aug 2008 23:57:29 +0000 (23:57 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Sun, 24 Aug 2008 23:57:29 +0000 (23:57 +0000)
matroska timestamps are unsigned

Originally committed as revision 14956 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroskadec.c

index ece7ecf..d990b58 100644 (file)
@@ -1642,6 +1642,9 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
     AVStream *st = s->streams[stream_index];
     int index;
 
+    if (timestamp < 0)
+        timestamp = 0;
+
     index = av_index_search_timestamp(st, timestamp, flags);
     if (index < 0)
         return 0;