manage case 0 frames inside yuv_num_frames function and correct some warnings with gcc4.5 (credit to Winfried)
This commit is contained in:
@@ -1968,7 +1968,6 @@ int imagetotif(opj_image_t * image, const char *outfile)
|
||||
int width, height, imgsize;
|
||||
int bps,index,adjust, sgnd;
|
||||
int ushift, dshift, has_alpha, force16;
|
||||
unsigned int last_i=0;
|
||||
TIFF *tif;
|
||||
tdata_t buf;
|
||||
tstrip_t strip;
|
||||
@@ -2029,7 +2028,7 @@ int imagetotif(opj_image_t * image, const char *outfile)
|
||||
for(strip = 0; strip < TIFFNumberOfStrips(tif); strip++)
|
||||
{
|
||||
unsigned char *dat8;
|
||||
tsize_t i, ssize;
|
||||
tsize_t i, ssize, last_i = 0;
|
||||
int step, restx;
|
||||
ssize = TIFFStripSize(tif);
|
||||
dat8 = (unsigned char*)buf;
|
||||
|
||||
@@ -595,7 +595,7 @@ int main(int argc, char **argv) {
|
||||
file_length = ftell(fsrc);
|
||||
fseek(fsrc, 0, SEEK_SET);
|
||||
src = (unsigned char *) malloc(file_length);
|
||||
if (fread(src, 1, file_length, fsrc) != file_length)
|
||||
if (fread(src, 1, file_length, fsrc) != (size_t)file_length)
|
||||
{
|
||||
free(src);
|
||||
fclose(fsrc);
|
||||
|
||||
Reference in New Issue
Block a user