[FFmpeg-devel] [PATCH] Fix seeking for matroska files with CUES before first cluster

Michael Niedermayer michaelni at gmx.at
Thu Sep 22 21:25:47 CEST 2011


On Thu, Sep 22, 2011 at 07:51:00AM -0700, Aaron Colwell wrote:
> Hi,
> 
> The attached patch fixes a bug where seeking doesn't work properly for
> matroska files that have the CUES element before the first cluster.
> This bug was accidentally introduced a few months ago by my deferred CUES
> loading patch<http://git.videolan.org/?p=ffmpeg.git;a=commit;h=31ad14c21e0735387ba8082c6e3436241f7ccfc8>
> .
> 
> When the CUES element appears before the first cluster in the file, the data
> is parsed and placed in matroska->index but that data is never added to the
> seek index. Currently the transfer from matroska->index to the seek index
> only happens when matroska_parse_cues() is called.
> Matroska_parse_cues() only gets called on a seek if cues_parsing_deferred is
> set. Cues_parsing_deferred only gets set if parsing the CUES requires
> seeking past the first cluster. There is no code to handle the case where
> CUES is before the first cluster.
> 
> This fix essentially restores the matroska->index processing that was
> happening at the end of matroska_read_header() before I made my CUES
> deferral change. In the case where CUES is before the first
> cluster, matroska->index will have data and the seek index will be updated.
> In the case where CUES is later in the file, matroska->index will be empty
> and cues_parsing_deferred will be set so loading will happen later.

applied, thanks

our matroska mnintainer is in CC but probably busy which is why i
applied it.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110922/1f9a5707/attachment.asc>


More information about the ffmpeg-devel mailing list