Menu

#29 patch for stbl.c (crashfix)

open
nobody
OQT Library (9)
5
2014-09-18
2005-08-26
No

Bug:
cinerella and other soft that use quicktime4linux or
libquicktime
crashes on opening large .mov files produced by my
photo camera
Minolta DimageZ3

patch:
patch for quicktime4linux/libquicktime

--- src/stbl.c 2002-12-15 03:51:59 +0200
+++ src/stbl.c 2005-08-23 11:04:50 +0300
@@ -114,7 +115,12 @@
{ quicktime_read_stss(file, &(stbl->stss)); }
else
if(quicktime_atom_is(&leaf_atom, "stsc"))
- { quicktime_read_stsc(file, &(stbl->stsc)); }
+ {
+ quicktime_read_stsc(file, &(stbl->stsc));
+ /* at least Minolta DimageZ3 pads stsc with zeroes
+ * so we need to jump to next atom explicitly */
+ quicktime_atom_skip(file, &leaf_atom);
+ }
else
if(quicktime_atom_is(&leaf_atom, "stsz"))
{ quicktime_read_stsz(file, &(stbl->stsz)); }

patch for openquicktime

--- lib/stbl.c 2002-12-15 03:51:59 +0200
+++ lib/stbl.c 2005-08-23 11:04:50 +0300
@@ -114,7 +115,12 @@
{ oqt_read_stss(file, &(stbl->stss)); }
else
if(oqt_atom_is(&leaf_atom, "stsc"))
- { oqt_read_stsc(file, &(stbl->stsc)); }
+ {
+ oqt_read_stsc(file, &(stbl->stsc));
+ /* at least Minolta DimageZ3 pads stsc with zeroes
+ * so we need to jump to next atom explicitly */
+ oqt_atom_skip(file, &leaf_atom);
+ }
else
if(oqt_atom_is(&leaf_atom, "stsz"))
{ oqt_read_stsz(file, &(stbl->stsz)); }

As you can see below, if mov file is large (approx. > 1MB)
my Minolta Dimage Z3 reserves a free space for another
entry in stsc.
The atom itself is correct, because its size is right and
number of entries is also right,
so we need to skip to the boundary of the next atom
properly.

Here is a piece of file dump:

||||+---------------------------
|||||atom stbl: len=1340 at pos 4782472
|||||/---------------------------
||||||atom stsd: len=104 at pos 4782480
||||||Version=[0]
||||||Flags=[

Discussion


Log in to post a comment.