commit - 986b215cdb6f7ee801a41ed35e5fef08aeb33d29
commit + 31b81bc47bc47d4e10fff60bf4f42f6c99170b1b
blob - 3f7581bb2de0a8daec69af42b873a2d4a2b29cac
blob + a01eaae5b5698b6bd96e741b55b295c4070d000f
--- player_oggvorbis.c
+++ player_oggvorbis.c
OggVorbis_File vf;
vorbis_info *vi;
int64_t seek = -1;
- int current_section, eof = 0, ret = 0;
+ int current_section, ret = 0;
if ((f = fdopen(fd, "r")) == NULL) {
*errstr = "fdopen failed";
player_setduration(ov_time_total(&vf, -1) * vi->rate);
- while (!eof) {
+ for (;;) {
long r;
if (seek != -1) {
r = ov_read(&vf, pcmout, sizeof(pcmout), 0, 2, 1,
¤t_section);
if (r == 0)
- eof = 1;
+ break;
else if (r > 0) {
/* TODO: deal with sample rate changes */
if (!play(pcmout, r, &seek)) {