]> git.sesse.net Git - vlc/commitdiff
* src/video_output/vout_subpictures.c: fixed OSD alignment
authorGildas Bazin <gbazin@videolan.org>
Tue, 3 Aug 2004 23:19:01 +0000 (23:19 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 3 Aug 2004 23:19:01 +0000 (23:19 +0000)
src/video_output/vout_subpictures.c

index 4b316b64452623e751f210884460be546a44acd3..2d451e332251439ac9ebaefa63c51dc4c77cb720 100644 (file)
@@ -402,21 +402,23 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic,
 
             if( p_subpic->i_flags & OSD_ALIGN_BOTTOM )
             {
-                i_y_offset += p_vout->output.i_height - p_region->fmt.i_height;
+                i_y_offset = p_vout->output.i_height - p_region->fmt.i_height -
+                    p_subpic->i_y;
             }
             else if ( !(p_subpic->i_flags & OSD_ALIGN_TOP) )
             {
-                i_y_offset += p_vout->output.i_height / 2 -
+                i_y_offset = p_vout->output.i_height / 2 -
                     p_region->fmt.i_height / 2;
             }
 
             if( p_subpic->i_flags & OSD_ALIGN_RIGHT )
             {
-                i_x_offset += p_vout->output.i_width - p_region->fmt.i_width;
+                i_x_offset = p_vout->output.i_width - p_region->fmt.i_width -
+                    p_subpic->i_x;
             }
             else if ( !(p_subpic->i_flags & OSD_ALIGN_LEFT) )
             {
-                i_x_offset += p_vout->output.i_width / 2 -
+                i_x_offset = p_vout->output.i_width / 2 -
                     p_region->fmt.i_width / 2;
             }