[xiph-cvs] cvs commit: vorbis-tools/vorbiscomment vcomment.c
Michael Smith
msmith at xiph.org
Mon Sep 24 23:25:26 PDT 2001
msmith 01/09/24 23:25:26
Modified: vorbiscomment vcomment.c
Log:
Fix some more silly errors, so it might actually work reliably, and might
even not leak as much memory.
Revision Changes Path
1.12 +4 -2 vorbis-tools/vorbiscomment/vcomment.c
Index: vcomment.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/vorbiscomment/vcomment.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vcomment.c 2001/09/25 06:20:43 1.11
+++ vcomment.c 2001/09/25 06:25:26 1.12
@@ -24,6 +24,7 @@
{"help",0,0,'h'},
{"quiet",0,0,'q'},
{"commentfile",1,0,'c'},
+ {"encoding", 1,0,'e'},
{NULL,0,0,0}
};
@@ -228,6 +229,7 @@
/* append the comment and return */
vorbis_comment_add_tag(vc, line, utf8_value);
+ free(utf8_value);
return 0;
} else {
fprintf(stderr, "Couldn't convert comment to UTF8, "
@@ -316,7 +318,7 @@
int ret;
int option_index = 1;
- while ((ret = getopt_long(argc, argv, "aelwhqc:t:",
+ while ((ret = getopt_long(argc, argv, "ae:lwhqc:t:",
long_options, &option_index)) != -1) {
switch (ret) {
case 0:
@@ -333,7 +335,7 @@
param->mode = MODE_APPEND;
break;
case 'e':
- param->mode = strdup(optarg);
+ param->encoding = strdup(optarg);
break;
case 'h':
usage();
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list