|
From: Jean-Francois P. <pan...@co...> - 2004-05-29 19:13:41
|
If you try to use oqtencoder to generate a movie with TIFF media, the result will not be playable in QT 6.5.1. The problem is at the end of encode_tiff() in codec_tiff.c: the line: frame_size = TIFFWriteEncodedStrip(tiff, 0, raster, height*width*samples_per_pixel); is incorrect, since TIFFWriteEncodedStrip() will only return the total size of the data written, not including the TIFF header or directory. So you will end up with less than the total TIFF file in your .mov file. The patch attached to this mail uses the buffer_max field of the structure used by the memory-mapped I/O functions passed to libtiff to figure out the total size of the TIFF file generated in memory. It also means that you should not longer be calling reset_buffer_tiff() in close_function() (called from TIFFClose()), otherwise you lose that information. That being said, both decode_tiff() and encode_tiff() call reset_buffer_tiff() before using libtiff, so this should not be a problem. Note that if you are using uncompressed TIFF files, you will also want the change to lib/stsz.c from the latest CVS (not in 2.0.0a1), otherwise files with identical media sizes in them are not read correctly by QT 6.5.1. With the change to codec_tiff.c and stsz.c, I was able to encode .mov files with TIFF media. JF |