[MPlayer-dev-eng] patch: YUV4MPEG2 demuxer

Rik Snel rsnel at cube.dyndns.org
Thu Dec 27 14:10:16 CET 2001


Hello, 

> > On Thu, 27 Dec 2001, Alex Beregszaszi wrote:
> > > I hacked the older YUV4MPEG format support into your demuxer, it works
> > > fine. You can produce samples with XAWTV.
> > Cool, but there is a slight problem if it try to use it with the old
> > mjpeg tools:
> > 
> > 'Slow source' problem again (as above). The YUV4MPEG header is shorter
> > than the YUV4MPEG2 header. Only 19 bytes are available (in the beginnig),
> > the ASF checker wants more, so the header is lost. The Y4M checker should
> > be moved so that it appears before the asf check. (the AVI check
> > only takes 8 bytes, so that is okay) (indeed -cache solves
> > the problem, but it is not the default)
> 
> I think every demuxer should be seek to the beginning after *_file_check,
> and than read the header in demux_open too. It would solve the problem.
The problem is that it's impossible to seek back in standard input. (you
can only seek back in the current buffer, but the buffer gets overwritten
everytime a new read is done, so after a second read the first part of the
header is really lost and seeking back (to the beginning of the
buffer) doesn't help.

My patch.stream solves the problem but it is very intrusive (and it
possibly breaks the cache, didn't test). 

Greetings,

Rik.

--------
Nothing is ever a total loss; it can always serve as a bad example.




More information about the MPlayer-dev-eng mailing list