another patch for demux_matroska.c. It adds chapter support. It applies
on top of my seeking patch but without the 'movie title' patch I've sent
The chapter support is much the same as it is in demux_ogg.c from which
I've copied most of the code: the title is set according to the current
chapter, and the Matroska demuxer acts on the NEXT and PREVIOUS events.
One drawback that I haven't fixed yet is that the send_chunk function
always handles one complete cluster. As clusters can contain quite a lot
of data this means that the movie title is updated much too early. If a
chapter starts at 00:00:30s the display will be changed when the cluster
containing the first packet at 00:00:30s is being read which is probably
about 10s before it is being played.
The solution is to process only one (Matroska) block for each call to
send_data. But I'm out of time now. I'll do that in a couple of days.
I'd like some comments :)
If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds