I tryed this piece of code to write a second file with the same comments
in it but the program always crash on vcedit_write()... I'm unable to
figure out why it is crashing. Compiled under Visual Stucio .NET 2003
with ogg.dll and vorbis.dll linked dynamically! vcomment doesn't crash
linked dynamically with ogg.dll and vorbis.dll
#include <stdio.h>
#include <stdlib.h>
#include "vcedit.h"
#include "utf8.h"
#include "i18n.h"
int main()
{
FILE *oggFile;
FILE *heym;
vcedit_state *state;
vorbis_comment *vc;
if ((oggFile = fopen("InFile.ogg", "rb")) == NULL)
exit(0);
if ((heym = fopen("OutFile.ogg", "wb")) == NULL)
exit(0);
state = vcedit_new_state();
if (vcedit_open(state, oggFile) < 0)
{
printf("erreur\n");
exit(0);
}
//vc = vcedit_comments(state);
vcedit_write(state, heym);
vcedit_clear(state);
fclose(oggFile);
fclose(heym);
return 0;
}
Any idea??
Gabriel Lavoie