Displaying 2 results from an estimated 2 matches for "vcedit_new_st".
2004 Nov 22
1
Editing comments in Vorbis files...
...8.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
2003 Aug 25
3
mem leak when writing ogg vorbis comments
...bis_comment *pvcin;
FILE * in=NULL, *out=NULL;
char *buf=new char[1024];
// Read the initial tag
in = fopen(szFilePath, "rb");
if (in == NULL) {
// ... handle the failure case
return FALSE;
}
state = vcedit_new_state();
if(vcedit_open(state, in) < 0) {
// ... handle the failure case
return FALSE;
}
// <removed all the stuff that fills the comment structure with the new values>
// Write the file to another file in this directory....