[xiph-commits] r9695 - trunk/vorbis-tools/oggenc
msmith at svn.xiph.org
msmith at svn.xiph.org
Wed Aug 3 12:13:38 PDT 2005
Author: msmith
Date: 2005-08-03 12:13:35 -0700 (Wed, 03 Aug 2005)
New Revision: 9695
Modified:
trunk/vorbis-tools/oggenc/encode.h
trunk/vorbis-tools/oggenc/oggenc.c
Log:
Allow setting explicit zero serial number
Modified: trunk/vorbis-tools/oggenc/encode.h
===================================================================
--- trunk/vorbis-tools/oggenc/encode.h 2005-08-02 21:41:23 UTC (rev 9694)
+++ trunk/vorbis-tools/oggenc/encode.h 2005-08-03 19:13:35 UTC (rev 9695)
@@ -86,6 +86,7 @@
float scale;
unsigned int serial;
+ int fixedserial;
} oe_options;
typedef struct
Modified: trunk/vorbis-tools/oggenc/oggenc.c
===================================================================
--- trunk/vorbis-tools/oggenc/oggenc.c 2005-08-02 21:41:23 UTC (rev 9694)
+++ trunk/vorbis-tools/oggenc/oggenc.c 2005-08-03 19:13:35 UTC (rev 9695)
@@ -79,7 +79,7 @@
oe_options opt = {NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL,
0, NULL, 0, NULL, 0, NULL, 0, 1, 0, 0,16,44100,2, 0, NULL,
DEFAULT_NAMEFMT_REMOVE, DEFAULT_NAMEFMT_REPLACE,
- NULL, 0, -1,-1,-1,.3,-1,0, 0,0.f, 0};
+ NULL, 0, -1,-1,-1,.3,-1,0, 0,0.f, 0, 0};
int i;
@@ -121,7 +121,7 @@
exit(1);
}
- if(opt.serial == 0)
+ if(!opt.fixedserial)
{
/* We randomly pick a serial number. This is then incremented for each file */
srand(time(NULL));
@@ -691,6 +691,8 @@
* ints. Damn */
if(sscanf(optarg, "%u", &opt->serial) != 1)
opt->serial = 0; /* Failed, so just set to zero */
+ else
+ opt->fixedserial = 1;
break;
case 't':
opt->title = realloc(opt->title, (++opt->title_count)*sizeof(char *));
More information about the commits
mailing list