git: 9front

Download patch

ref: ec30865e71d30d7bbd02f4fb766978dfb4ef115e
parent: dd8b534fb08fa0004285b409aec2ce070b6129f5
author: Sigrid <ftrvxmtrx@gmail.com>
date: Tue Aug 18 12:45:00 EDT 2020

oggdec: give it enough chance to seek from the start, where first seek might be still too close to the beginning of the file

--- a/sys/src/cmd/audio/oggdec/oggdec.c
+++ b/sys/src/cmd/audio/oggdec/oggdec.c
@@ -298,7 +298,7 @@
 	    }else{
 	      if(seeking){
 	        time = vorbis_granule_time(&vd, ogg_page_granulepos(&og));
-	        if(time > left && time < right && time - lasttime > 0.1){
+	        if(time > left && time < right && (time - lasttime > 0.1 || lasttime < 0.1)){
 	          if(time > seek)
 	            right = time;
 	          else
--