changeset 926:823fcde78b1b libavformat

sanity checks for seeking
author michael
date Thu, 02 Feb 2006 19:23:33 +0000
parents 2d9a65a1d9ea
children a28b47d5238a
files utils.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Thu Feb 02 15:21:19 2006 +0000
+++ b/utils.c	Thu Feb 02 19:23:33 2006 +0000
@@ -1348,6 +1348,12 @@
         pos_limit= pos_max;
     }
 
+    if(ts_min > ts_max){
+        return -1;
+    }else if(ts_min == ts_max){
+        pos_limit= pos_min;
+    }
+
     no_change=0;
     while (pos_min < pos_limit) {
 #ifdef DEBUG_SEEK