[MPlayer-dev-eng] [PATCH] hangling missing VobSub palettes in Matroska files

Csillag Kristof fenwick at freemail.hu
Wed Jan 19 05:30:07 CET 2005


Hi there!


1. The problem

If I do the following:

a) Dump a VobSub subtitle with mencoder 
	(mencoder MOVIE.vob sid 0 -vobsuboutindex 0 -vobsuboutid en
		 -vobsubout subs_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:
http://rht.bme.hu/~lunkwill/computer/mplayer/clip-2.mkv
You can see a screenshot here:
http://rht.bme.hu/~lunkwill/computer/mplayer/palette-error.jpg
)


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:
http://rht.bme.hu/~lunkwill/computer/mplayer/palette-error-fixed.jpg


-- 
Csillag Kristof <fenwick at freemail.hu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: csk-vobsub-missing-palette-in-mkv.patch
Type: text/x-patch
Size: 1934 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050119/7f324ba1/attachment.bin>


More information about the MPlayer-dev-eng mailing list