Hey all...I'm trying to use the decoder_example.c in the examples directory
to decode a .ogg file that was encoded by using the binary encoder
ogglame.exe and encoded via the encoder_example.c. I'm running into a
problem with the decoder though. It plays FINE under the WinAmp plugin but I
when I try and use the decoder_example.c to decode the file it says "End of
file before finding all Vorbis headers!"
Snippet from ln 169
/* no harm in not checking before adding more */
buffer=ogg_sync_buffer(&oy,4096);
bytes=fread(buffer,1,4096,stdin);
if(bytes==0 && i<2){
fprintf(stderr,"End of file before finding all Vorbis
headers!\n");
exit(1);
}
For whatever reason bytes is comming back as 0...can sombody please tell me
what I'm doing wrong?
Thanks for the help!
Chris
--
Chris Hirsch http://www.Tecomac.com
chris@Tecomac.com What? Me Worry? Linux Inside
<INSERT RANDOM WAAAAY COOL QUOTE HERE>
_. _____ __.. .__ ..
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
> Hey all...I'm trying to use the decoder_example.c in the examples directory > to decode a .ogg file that was encoded by using the binary encoder > ogglame.exe and encoded via the encoder_example.c. I'm running into a > problem with the decoder though. It plays FINE under the WinAmp plugin but I > when I try and use the decoder_example.c to decode the file it says "End of > file before finding all Vorbis headers!"Spoke to Chris in IRC today; this *appears* to be a Win build issue of some variety (it decodes fine in a Linux build of decoder_example). Could a Winfolk look at it? Monty --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
Hi Chris,>ogglame.exe and encoded via the encoder_example.c. I'm running into a >problem with the decoder though. It plays FINE under the WinAmp plugin but >I >when I try and use the decoder_example.c to decode the file it says "End of >file before finding all Vorbis headers!"Assuming that this is for Windows, what compiler did you use? I just built the encoder/decoder under VC6 and Mingw32, and both worked just fine. The source code I'm using was fetched from CVS about 2-3 days ago. -Andy ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
Grrrr...well thank you all for your responses....it was much easier than it should have been and I should have caught it much earlier. Its called BINARY MAN!! hehehe I wasn't reading the file in binary xiphmont really clued me in there (thank you BTW) so all is well. And yet another question: When will Vorbis be able to support sampling rates around 11kHz? Thanks again for all of your time, Chris> -----Original Message----- > From: Chris Hirsch [mailto:chirsch@tecomac.com] > Sent: Monday, July 24, 2000 9:38 AM > To: 'vorbis-dev@xiph.org' > Subject: [vorbis-dev] Decoder example question > > > Hey all...I'm trying to use the decoder_example.c in the > examples directory > to decode a .ogg file that was encoded by using the binary encoder > ogglame.exe and encoded via the encoder_example.c. I'm running into a > problem with the decoder though. It plays FINE under the > WinAmp plugin but I > when I try and use the decoder_example.c to decode the file > it says "End of > file before finding all Vorbis headers!" > > Snippet from ln 169 > /* no harm in not checking before adding more */ > buffer=ogg_sync_buffer(&oy,4096); > bytes=fread(buffer,1,4096,stdin); > if(bytes==0 && i<2){ > fprintf(stderr,"End of file before finding all Vorbis > headers!\n"); > exit(1); > } > For whatever reason bytes is comming back as 0...can sombody > please tell me > what I'm doing wrong? > > Thanks for the help! > Chris > -- > Chris Hirschhttp://www.Tecomac.com chris@Tecomac.com What? Me Worry? Linux Inside <INSERT RANDOM WAAAAY COOL QUOTE HERE> _. _____ __.. .__ .. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/