One small addendum to 7c52622f.
authorTimothy B. Terriberry <tterribe@xiph.org>
Tue, 23 Oct 2012 03:42:15 +0000 (20:42 -0700)
committerTimothy B. Terriberry <tterribe@xiph.org>
Tue, 23 Oct 2012 03:42:15 +0000 (20:42 -0700)
This case can basically only get hit if there's another stream
 multiplexed in with ours, but this avoids re-scanning the same
 data multiple times when it happens.

src/opusfile.c

index be029fe..e88d65e 100644 (file)
@@ -2173,6 +2173,9 @@ static int op_pcm_seek_page(OggOpusFile *_of,
           if(OP_UNLIKELY(ret<0))return ret;
           /*Bump up the chunk size.*/
           chunk_size=OP_MIN(2*chunk_size,OP_CHUNK_SIZE_MAX);
+          /*If we did find a page from another stream or without a timestamp,
+             don't read past it.*/
+          boundary=next_boundary;
         }
       }
       else{