[MPlayer-dev-eng] PATCH to support theora-exp in mplayer

Rich Felker dalias at aerifal.cx
Wed May 25 06:56:59 CEST 2005


On Tue, May 24, 2005 at 09:55:20PM -0400, Timothy B. Terriberry wrote:
> I'll address Rich's comment here, as well: the purpose of this is not to
> put back data packets that appear before header packets. One of the
> intentions of the Theora team (not necessarily one I agree with, but I
> am not the entire team) is in the future to support additional, optional
> headers beyond the required three (one potential example being a header
> containing an ICC profile). The API supports this now, so that if such
> things are added to the format, a library upgrade is all that is
> required, without requiring additional changes to mplayer's codebase.
> With the demuxer reorganization, I took the opportunity to use this API
> properly. Since it doesn't know in advance how many headers there are,
> the code reads header packets until it reaches the first data packet,
> then stuffs them into your crazy extradata format, and puts the data
> packet back into the demuxer so that the first frame is properly decoded.

Thank you for explaining it. Can't we do this without adding "unget"
hacks to the demuxer layer though? For instance, just keep the extra
packet we got in the demuxer private data, and output it next time the
demuxer is called?

My philosophy is that, when hacks are required to support a bad format
(xiph headers), they should be isolated as close to the "problem" as
possible, so that they don't affect other parts of the program.

Rich




More information about the MPlayer-dev-eng mailing list