Pointer values initialized to zero

This commit is contained in:
Francois-Olivier Devaux 2004-08-27 14:22:33 +00:00
parent 0abe8e1997
commit 313975debf
2 changed files with 9 additions and 7 deletions

View File

@ -83,7 +83,7 @@
void mj2_memory_free(mj2_movie_t * movie)
{
int i;
mj2_tk_t *tk;
mj2_tk_t *tk=NULL;
if (movie->num_cl != 0)
free(movie->cl);
@ -567,7 +567,7 @@ int mj2_read_mdat(mj2_movie_t * movie, unsigned char *src, char *outfile)
int track_nb;
unsigned int i;
int jp2c_cio_len, jp2c_len, pos_correction = 0;
FILE *f;
FILE *f=NULL;
mj2_box_t box;
@ -638,6 +638,8 @@ int mj2_read_mdat(mj2_movie_t * movie, unsigned char *src, char *outfile)
if (imagetoyuv(&img, &cp, tk->imagefile))
return 1;
j2k_dec_release();
if (cio_tell() + 8 != jp2c_len) {
fprintf(stderr, "Error with JP2C Box Size\n");
return 1;
@ -2843,8 +2845,8 @@ int mj2_read_moov(mj2_movie_t * movie, j2k_image_t * img)
int mj2_encode(mj2_movie_t * movie, j2k_cp_t * cp, char *index)
{
char *outbuf;
FILE *outfile;
char *outbuf=NULL;
FILE *outfile=NULL;
int len;
unsigned int i;

View File

@ -39,9 +39,9 @@ int ceildiv(int a, int b)
int main(int argc, char **argv)
{
FILE *f;
char *src, *src_name;
char *dest, S1, S2, S3;
FILE *f=NULL;
char *src=NULL, *src_name=NULL;
char *dest=NULL, S1, S2, S3;
int len;
j2k_cp_t cp;
mj2_movie_t mj2_movie;