changeset 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 9451f2f58b14
children e3fb53259d86
files dv.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;