]> git.sesse.net Git - vlc/commitdiff
* Ehm, MAX, not MIN of course. And let's check both before and after cropping.
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 16 Jan 2007 16:01:49 +0000 (16:01 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 16 Jan 2007 16:01:49 +0000 (16:01 +0000)
src/video_output/vout_subpictures.c

index f9790c7f20e263dc20525961a1cdd77810ee8978..6a1fda227448034172e31675cf17e1f394ff887c 100644 (file)
@@ -731,6 +731,9 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
                     p_subpic->i_y * i_scale_height / 1000;
 
             }
+            
+            i_x_offset = __MAX( i_x_offset, 0 );
+            i_y_offset = __MAX( i_y_offset, 0 );
 
             if( p_spu->i_margin != 0 && p_spu->b_force_crop == VLC_FALSE )
             {
@@ -804,8 +807,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
                 }
             }
 
-            i_x_offset = __MIN( i_x_offset, 0 );
-            i_y_offset = __MIN( i_y_offset, 0 );
+            i_x_offset = __MAX( i_x_offset, 0 );
+            i_y_offset = __MAX( i_y_offset, 0 );
 
             p_spu->p_blend->pf_video_blend( p_spu->p_blend, p_pic_dst,
                 p_pic_src, &p_region->picture, i_x_offset, i_y_offset,