[MPlayer-dev-eng] [BUG] cache filling with Ogm-on-mode2-CD

Moritz Bunkus moritz at bunkus.org
Sun Jan 5 11:32:48 CET 2003


Hi.

While fixing the Ogm-on-XCD seeking problem I encountered a problem
related to the cache. What I've done:

With mode2cdmaker (available from
http://webs.ono.com/usr016/de_xt/mcf.html) I took an Ogg file and
produced the .bin/.cue image. I then ran

mplayer -cuefile myfile.cue -vcd 2

This works fine. Seeking is fine with the patch I just sent to -devel.
However as soon as caching is activated (cache="yes" and size specified
in ~/.mplayer/config) mplayer enters an infinite loop upon starting.
I've done some debugging and found out that instead of
demux_ogg_fill_buffer demux_mpg_fill_buffer was called - so Ogg
detection failed obviously. Debugging a bit more I found out that when
demux_ogg_open is called the stream is at the wrong position. Searching
the .bin for "OggS" (the signature for an Ogg file) I found it at
0x1038D8. However the first four bytes that demux_ogg_open saw after
reading from the stream where located at 0x207198 in the .bin - that's
approximately twice the the first offset.

Now this only happens when the cache is enabled and when I use an image
created with mode2cdmaker, not with a XCD image created with some
Windows program (not mode2cdmaker but another one whose name I just
can't remember).

If I include 
  stream_seek(s,0);
at the top of demux_ogg_open then it works if the cache is involved but
breaks if the cache is disabled (because then it'll seek to the start
of the .bin which of course is wrong, but somehow the cache seems to
offset things from stream->start_pos!??).

So A'rpi or any other devlopper... Could you please take a look at this
or provide some insight for me on how the cache works?

Thanks.

-- 
 ==> Ciao, Mosu (Moritz Bunkus)


More information about the MPlayer-dev-eng mailing list