View Single Post
Old 18th April 2013, 01:03   #9  |  Link
akropp
Registered User
 
Join Date: Sep 2009
Posts: 13
Sounds like a plan. Do you happen to know where I can find the spec on where free atoms are valid or not? I was under the impression that they were valid everywhere and would be ignored, but I guess that's not the case.

Edit:

Found the spec, it says:

Quote:
8.1.2.1 Definition
Box Types: ‘free’, ‘skip’
Container: File or other box
Mandatory: No
Quantity: Any number
The contents of a free-space box are irrelevant and may be ignored, or the object deleted, without affecting
the presentation. (Care should be exercised when deleting the object, as this may invalidate the offsets used
in the sample table, unless this object is after all the media data).
I didn't see in the spec for stsd any exclusion of free atoms? I don't doubt that its irregular, but I'm just trying to figure out where it would have problems so I can change the muxing code to work better.

The file I have has free atoms in all the stbl atoms because the header is pre-allocated for a max recording time. Then, every time an stco chunk is written, the mux code updates the stbl atoms with the latest information (unlike other muxers that write everything at the end). This way if the machine crashes or the process dies in the middle of recording you still have a playable file even if the file wasn't closed properly.

If the stsd is the only atom that is going to cause problems with a free atom that's an easy fix. I'm hoping that free atom's in the other atoms aren't also causing issues though.

Last edited by akropp; 18th April 2013 at 01:14.
akropp is offline   Reply With Quote