diff dv.c @ 5872:cf5eee67f9eb libavformat

Fix seeking in DV when filesize is unknown. Patch by Tomas H¸«£rdin, tomas D hardin A codemill D se
author cehoyos
date Tue, 23 Mar 2010 17:22:25 +0000
parents 15f34b5059ed
children 536e5527c1e0
line wrap: on
line diff
--- a/dv.c	Tue Mar 23 08:00:37 2010 +0000
+++ b/dv.c	Tue Mar 23 17:22:25 2010 +0000
@@ -375,7 +375,7 @@
 
     offset = sys->frame_size * timestamp;
 
-    if (offset > max_offset) offset = max_offset;
+    if (size >= 0 && offset > max_offset) offset = max_offset;
     else if (offset < 0) offset = 0;
 
     return offset;