Synchronization of samples from different tracks occasionally cannot be guaranteed for certain stream
structures and certain numbers of elements in an internal buffer. If this happens,
MP4DMX_RET_EXECUTE_WARNING is returned when ordinary processing (getting samples,
MP4DMXExecute) exits (when an ending time is specified or at the end of a fragment).
MP4DMX_RET_EXECUTE_WARNING is not returned for any stream that is not fragmented and has audio
and video of equal length.
MP4DMX_RET_EXECUTE_WARNING has been returned, behavior depends on the processing
defined by the application. The following diagrams show the flowchart for track synchronization errors, and the sequence diagram.
After completing processing from initialization
MP4DMXOpen to header parsing
MP4DMXReadHeader, get system information (including the time scale, title, copyright, and
playback time) as well as video and audio track information (including the time scale, bitrate, and
sampling rate) using utility functions for header information (
MP4DMXGetAudioTrackInf). However, you
must read to the end of the MP4 data file when it is fragmented and does not have a
To get the playback time the user application must read to the end of the MP4 data file-and parse all fragments-for any return value. As a result, the return value
will indicate a fragment that has already been played back regardless of the time that you seek to in
the file when demultiplexing (getting current position,
MP4DMXExecute). To read to the end of an MP4
data file without marking it as having been played back, specify
MP4DMX_UNASSIGNED_END_TIME_STAMP—which indicates the end of the file—as the input timestamp
when parsing headers (
MP4DMXReadHeader). If you do not read to the end of the MP4 data file, you
can only get the playback time of the fragments that have been read.
The following two figures show the procedure and sequence of events, respectively, for getting the playback time.
2014/08/04 Initial version.