[MPlayer-dev-eng] [PATCH] hangling missing VobSub palettes in Matroska files
fenwick at freemail.hu
Wed Jan 19 05:30:07 CET 2005
1. The problem
If I do the following:
a) Dump a VobSub subtitle with mencoder
(mencoder MOVIE.vob sid 0 -vobsuboutindex 0 -vobsuboutid en
b) Put it into a Matroska file with mkvmerke
c) Replay it with mplayer,
I get a black subtitle. (I mean, all four colors are black.)
(I uploaded a clip produced using steps a) and b) here:
You can see a screenshot here:
2. The reason:
Mencoder doesn't include the palette in the dumped vobsub file.
This should not be a problem, since MPlayer has a nice build-in
heuristic code for guessing a useable palette. But it's not activated,
because the vobsub renderer code is not called with NULL pointer for
palette, but with a zeroed-out palette, whis is read out from the mkv
demuxer's data, which doesn't remember that there was no palette read in
the first place.
3. The quick solution:
I introduced a new flag in the vobsub data header in the mkv demuxer,
which stores wherher a palette has been read in. When the vobsub
renderer code is called, the palette is only passed if it has been read
in, if not, a NULL is passed, end the heuristic code is activated.
Screenshot after applying the attached patch:
Csillag Kristof <fenwick at freemail.hu>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1934 bytes
Desc: not available
More information about the MPlayer-dev-eng