Bug with sound and hint tracks fixed
This commit is contained in:
parent
2ebe5f2c92
commit
7250ce0668
17
mj2/mj2.c
17
mj2/mj2.c
|
@ -469,16 +469,10 @@ int mj2_write_mdat(FILE * outfile, mj2_movie_t * movie, j2k_image_t * img,
|
|||
cio_skip(4);
|
||||
cio_write(MJ2_MDAT, 4); /* MDAT */
|
||||
|
||||
|
||||
for (i = 0; i < movie->num_stk; i++) {
|
||||
fprintf(stderr, "Unable to write sound tracks\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < movie->num_htk; i++) {
|
||||
fprintf(stderr, "Unable to write hint tracks\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < movie->num_vtk; i++) {
|
||||
for (i = 0; i < movie->num_stk + movie->num_htk + movie->num_vtk; i++) {
|
||||
if (movie->tk[i].track_type != 0) {
|
||||
fprintf(stderr, "Unable to write sound or hint tracks\n");
|
||||
} else {
|
||||
j2k_cp_t cp_init;
|
||||
mj2_tk_t *tk;
|
||||
|
||||
|
@ -552,10 +546,11 @@ int mj2_write_mdat(FILE * outfile, mj2_movie_t * movie, j2k_image_t * img,
|
|||
fwrite(&box_len_ptr, 4, 1, outfile);
|
||||
|
||||
fseek(outfile, box.init_pos + box.length, SEEK_SET);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Read the MDAT box
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue