shithub: riscv

Download patch

ref: de34481f8b80306b58687c1a3039feb785c4f98f
parent: 5405ee61ae0c8019598a974f02647bdaecf18c6f
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