comparison ogg2.c @ 730:9ae2511d1849 libavformat

fix seeking bug
author mru
date Tue, 12 Apr 2005 13:33:22 +0000
parents db6846a618bd
children 27449ee55201
comparison
equal deleted inserted replaced
729:9372cd60d25d 730:9ae2511d1849
552 int64_t pts = AV_NOPTS_VALUE; 552 int64_t pts = AV_NOPTS_VALUE;
553 553
554 ogg_save (s); 554 ogg_save (s);
555 555
556 while (min <= max){ 556 while (min <= max){
557 uint64_t p = min + (max - min) * target_ts / (tmax - tmin); 557 uint64_t p = min + (max - min) * (target_ts - tmin) / (tmax - tmin);
558 int i = -1; 558 int i = -1;
559 559
560 url_fseek (bc, p, SEEK_SET); 560 url_fseek (bc, p, SEEK_SET);
561 561
562 while (!ogg_read_page (s, &i)){ 562 while (!ogg_read_page (s, &i)){