Commit 22765a22 authored by Antoine Cellerier's avatar Antoine Cellerier

fix subtitles position (aspect ratio)

the subtitle was displayed fine but since aspect ratios didn't match it
wasn't positioned correctly on the vout. ie:
--------------
|            |
|            |
|      subtit|
|            |
-------------- ( http://people.videolan.org/~dionoea/vlcsubs.png )

now it's displayed in the center but the letters are scaled horrizontaly
(which doesn't look too good ... but at least everything is displayed)
( http://people.videolan.org/~dionoea/vlcsubs2.png )
parent dbd9cdc2
......@@ -1387,7 +1387,10 @@ static subpicture_t *render( decoder_t *p_dec )
/* Create new SPU region */
memset( &fmt, 0, sizeof(video_format_t) );
fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
fmt.i_aspect = 0; /* 0 means use aspect ratio of background video */
/* FIXME -> subtitles will be squished when using VOUT_ASPECT_FACTOR
and they won't be placed correctly when using 0 and the video's
aspect ratio is different than the vout's aspect ratio */
fmt.i_aspect = VOUT_ASPECT_FACTOR;
fmt.i_width = fmt.i_visible_width = p_region->i_width;
fmt.i_height = fmt.i_visible_height = p_region->i_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment