[vlc-devel] commit: Revert "vout: avoid applying subtitle offset twice and modify behavior when subtitles overlap " (Jakob Leben )

git version control git at videolan.org
Sun Nov 29 16:18:02 CET 2009


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Sun Nov 29 13:50:07 2009 +0100| [c3a6f497780a0d622b71f9007399245645941157] | committer: Jakob Leben 

Revert "vout: avoid applying subtitle offset twice and modify behavior when subtitles overlap"

This reverts commit 4c627dc613cfc9d740691baefdf1fe74108b4a63.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c3a6f497780a0d622b71f9007399245645941157
---

 src/video_output/vout_subpictures.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index ff23e52..7ce0df4 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -518,10 +518,17 @@ void spu_RenderSubpictures( spu_t *p_spu,
             if( p_subpic->b_subtitle )
             {
                 area = spu_area_unscaled( area, scale );
+                if( !p_subpic->b_absolute && area.i_width > 0 && area.i_height > 0 )
+                {
+                    p_region->i_x = area.i_x;
+                    p_region->i_y = area.i_y;
+                }
                 if( p_subtitle_area )
                     p_subtitle_area[i_subtitle_area++] = area;
             }
         }
+        if( p_subpic->b_subtitle )
+            p_subpic->b_absolute = true;
     }
 
     /* */
@@ -1662,8 +1669,6 @@ static int SubpictureCmp( const void *s0, const void *s1 )
         r = IntegerCmp( p_subpic0->i_channel, p_subpic1->i_channel );
     if( !r )
         r = IntegerCmp( p_subpic0->i_order, p_subpic1->i_order );
-    //NOTE We swap subtitle order so that newer subtitles push older ones higher.
-    if( p_subpic0->b_subtitle && p_subpic1->b_subtitle ) r = !r;
     return r;
 }
 




More information about the vlc-devel mailing list