Bug while writing huge MOOV boxes fixed. Thanks to Valentin Mesaros !
This commit is contained in:
parent
2cbcbb25b0
commit
0130af0ff4
|
@ -149,7 +149,7 @@ int main(int argc, char *argv[]) {
|
||||||
char *buf;
|
char *buf;
|
||||||
int offset, mdat_initpos;
|
int offset, mdat_initpos;
|
||||||
j2k_image_t img;
|
j2k_image_t img;
|
||||||
int pos, i;
|
int i;
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
printf("Bad syntax: Usage: MJ2_Wrapper source_location mj2_filename\n");
|
printf("Bad syntax: Usage: MJ2_Wrapper source_location mj2_filename\n");
|
||||||
|
@ -264,10 +264,8 @@ int main(int argc, char *argv[]) {
|
||||||
cio_init(buf , i*10000);
|
cio_init(buf , i*10000);
|
||||||
if (setjmp(j2k_error)) {
|
if (setjmp(j2k_error)) {
|
||||||
i++;
|
i++;
|
||||||
realloc(buf,i*10000* sizeof(char));
|
buf = realloc(buf,i*10000* sizeof(char));
|
||||||
pos = cio_tell();
|
|
||||||
cio_init(buf , i*10000);
|
cio_init(buf , i*10000);
|
||||||
cio_seek(pos);
|
|
||||||
}
|
}
|
||||||
mj2_write_moov(&movie);
|
mj2_write_moov(&movie);
|
||||||
fwrite(buf,cio_tell(),1,mj2file);
|
fwrite(buf,cio_tell(),1,mj2file);
|
||||||
|
|
Loading…
Reference in New Issue