Correct two errors in patch for Trac #1486:
authorMonty <xiphmont@xiph.org>
Wed, 18 Jun 2014 06:33:58 +0000 (06:33 +0000)
committerMonty <xiphmont@xiph.org>
Wed, 18 Jun 2014 06:33:58 +0000 (06:33 +0000)
1) vf->offset should not have been overridden in new front-of-stream case
2) missing status output in seeking_example.c

svn path=/trunk/vorbis/; revision=19164

examples/seeking_example.c
lib/vorbisfile.c

index 73e0ac5..83fb7f4 100644 (file)
@@ -189,6 +189,8 @@ int main(){
 
     fprintf(stderr,"\r");
     {
+      fprintf(stderr,"testing pcm exact seeking to random places in %f seconds....\n",
+             timelength);
       for(i=0;i<1000;i++){
         ogg_int64_t val= i==0?(ogg_int64_t)0:(double)rand()/RAND_MAX*pcmlength;
         fprintf(stderr,"\r\t%d [pcm position %ld]...     ",i,(long)val);
index 0405f89..e380bde 100644 (file)
@@ -1557,7 +1557,6 @@ int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){
            our page, right at the beginning of PCM data.  Set state
            and return. */
 
-        vf->offset=result;
         vf->pcm_offset=total;
 
         if(link!=vf->current_link){