summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/vorbis.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/vorbis.c')
-rw-r--r--lib/rbcodec/codecs/vorbis.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/rbcodec/codecs/vorbis.c b/lib/rbcodec/codecs/vorbis.c
index c09d2cea6d..ca9db9b802 100644
--- a/lib/rbcodec/codecs/vorbis.c
+++ b/lib/rbcodec/codecs/vorbis.c
@@ -126,7 +126,6 @@ enum codec_status codec_run(void)
126 long n; 126 long n;
127 int current_section; 127 int current_section;
128 int previous_section; 128 int previous_section;
129 int eof;
130 ogg_int64_t vf_offsets[2]; 129 ogg_int64_t vf_offsets[2];
131 ogg_int64_t vf_dataoffsets; 130 ogg_int64_t vf_dataoffsets;
132 ogg_uint32_t vf_serialnos; 131 ogg_uint32_t vf_serialnos;
@@ -193,16 +192,17 @@ enum codec_status codec_run(void)
193 if (ci->id3->offset) { 192 if (ci->id3->offset) {
194 ci->seek_buffer(ci->id3->offset); 193 ci->seek_buffer(ci->id3->offset);
195 ov_raw_seek(&vf, ci->id3->offset); 194 ov_raw_seek(&vf, ci->id3->offset);
196 ci->set_elapsed(ov_time_tell(&vf));
197 ci->set_offset(ov_raw_tell(&vf)); 195 ci->set_offset(ov_raw_tell(&vf));
198 } 196 }
199 else { 197 else if (ci->id3->elapsed) {
200 ci->set_elapsed(0); 198 ov_time_seek(&vf, ci->id3->elapsed);
201 } 199 }
202 200
201 ci->set_elapsed(ov_time_tell(&vf));
202
203 previous_section = -1; 203 previous_section = -1;
204 eof = 0; 204
205 while (!eof) { 205 while (1) {
206 enum codec_command_action action = ci->get_command(&param); 206 enum codec_command_action action = ci->get_command(&param);
207 207
208 if (action == CODEC_ACTION_HALT) 208 if (action == CODEC_ACTION_HALT)
@@ -230,7 +230,7 @@ enum codec_status codec_run(void)
230 } 230 }
231 231
232 if (n == 0) { 232 if (n == 0) {
233 eof = 1; 233 break;
234 } else if (n < 0) { 234 } else if (n < 0) {
235 DEBUGF("Vorbis: Error decoding frame\n"); 235 DEBUGF("Vorbis: Error decoding frame\n");
236 } else { 236 } else {