changeset 3772:7814581e98ff libavformat

matroskadec: don't try to seek to negative timestamp matroska timestamps are unsigned
author aurel
date Sun, 24 Aug 2008 23:57:29 +0000
parents 9e9dce9660e4
children 2533332ca752
files matroskadec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Sun Aug 24 23:54:14 2008 +0000
+++ b/matroskadec.c	Sun Aug 24 23:57:29 2008 +0000
@@ -1642,6 +1642,9 @@
     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;