[MPlayer-dev-eng] [PATCH] Review please: support sub_pos in libass

Rafał Miłecki zajec5 at gmail.com
Mon Dec 22 21:48:02 CET 2008


Hope this time I'll provide some useful patch :)

Currently it is almost not possible to control position of subtitles
when using libass. OK, libass respects position from .ass file but
that's all. In case of subtitles from any other format, mplayer always
display subtitles on bottom.

This patch does:
1) Change default Alignment to 14 (0x1110) which is /invalid valign/
and HALIGN_CENTER.
2) Respects sub_pos in case of invalid value of (Alignment & 0x1100)

This way in case of lack of defined Alignment, value 14 is used and as
result sub_pos is respected. In case of using .ass file with defined
Alignment, value 14 is overwritten with some valid one coming from
.ass file.

Of course it is possible to use
-ass-force-style Alignment=14
and then even with Alignment defined in .ass file, sub_pos will be respected.
Btw. maybe we should add some easier alias option, like -ass-force-alignment?

I tried to test this in many situations and I found it working fine.
So please, review this for me now, as it may contain some mistaked I
didn't think about.

-- 
Rafał Miłecki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use.sub_pos.in.libass.patch
Type: application/octet-stream
Size: 4240 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081222/f52e896d/attachment.obj>


More information about the MPlayer-dev-eng mailing list