Commit 514116d7 authored by Gregory Maxwell's avatar Gregory Maxwell

oggenc: fix crash on raw file close, reported by Hanno in issue #2009. pointer...

oggenc: fix crash on raw file close, reported by Hanno in issue #2009. pointer to a non-static struct was escaping its scope. Also fix a C99-ism.

svn path=/trunk/vorbis-tools/; revision=19117
parent dc7f1488
......@@ -97,6 +97,8 @@ int main(int argc, char **argv)
.3,-1,
0,0,0.f,
0, 0, 0, 0, 0};
input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
N_("RAW file reader")};
int i;
......@@ -239,8 +241,6 @@ int main(int argc, char **argv)
if(opt.rawmode)
{
input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
N_("RAW file reader")};
enc_opts.rate=opt.raw_samplerate;
enc_opts.channels=opt.raw_channels;
......
......@@ -41,7 +41,7 @@ typedef struct {
ogg_int64_t granule_rate_d; /* granule rate denominator */
ogg_int64_t start_granule; /* start granule value */
ogg_uint32_t preroll; /* preroll */
unsigned char granule_shift; // a 8-bit field /* 1 byte value holding the granule shift */
unsigned char granule_shift; /* 1 byte value holding the granule shift */
char *message_header_fields; /* holds all the message header fields */
/* current total size of the message header fields, for realloc purpose, initially zero */
ogg_uint32_t current_header_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment