From 46df82be838571af99d0266f773b5fb274a924b5 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Wed, 14 Jul 2004 01:18:47 +0000 Subject: Moritz patch for matroska vobsub support align vobsub to bottom in libspudec CVS patchset: 6791 CVS date: 2004/07/14 01:18:47 --- src/libspudec/spu.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/libspudec/spu.c') diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c index 8d4bdcc5e..336837737 100644 --- a/src/libspudec/spu.c +++ b/src/libspudec/spu.c @@ -36,7 +36,7 @@ * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: spu.c,v 1.76 2004/06/26 13:49:54 mroi Exp $ + * $Id: spu.c,v 1.77 2004/07/14 01:18:48 miguelfreitas Exp $ * */ @@ -488,6 +488,22 @@ void spudec_process (spudec_decoder_t *this, int stream_id) { spudec_discover_clut(this->stream->xine, &this->state, &this->overlay); } + if (this->state.vobsub) { + int width, height; + int64_t duration; + + /* + * vobsubs are usually played with a scaled-down stream (not full DVD + * resolution), therefore we should try to realign it. + */ + + this->stream->video_out->status(this->stream->video_out, NULL, + &width, &height, &duration ); + + this->overlay.x = (width - this->overlay.width) / 2; + this->overlay.y = height - this->overlay.height; + } + /* Subtitle */ if( this->menu_handle < 0 ) { this->menu_handle = ovl_manager->get_handle(ovl_manager,1); -- cgit v1.2.3