changeset 1363:b7545c0c613a libavformat

rewind completely if sample time is negative
author bcoudurier
date Tue, 10 Oct 2006 13:00:50 +0000
parents 354355acf961
children 00cdaa81086a
files mxf.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mxf.c	Tue Oct 10 12:58:34 2006 +0000
+++ b/mxf.c	Tue Oct 10 13:00:50 2006 +0000
@@ -1033,8 +1033,10 @@
     int64_t seconds;
     int i;
 
-    if (!s->bit_rate || sample_time < 0)
+    if (!s->bit_rate)
         return -1;
+    if (sample_time < 0)
+        sample_time = 0;
     seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den);
     url_fseek(&s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET);
     /* sync on KLV essence element */