]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_subpictures.c
Fade for 1/4 of the display time.
[vlc] / src / video_output / vout_subpictures.c
index 12b15223e867882b977924deb25a1c42910aaef6..f46de3ec57466b870bfba77ddf0aa0daf38773d5 100644 (file)
@@ -925,7 +925,7 @@ static void SpuRenderRegion(spu_t *spu,
         dst->p_picture = picture_Hold(region_picture);
         int fade_alpha = 255;
         if (subpic->b_fade) {
-            mtime_t fade_start = (subpic->i_stop + subpic->i_start) / 2;
+            mtime_t fade_start = subpic->i_start + 3 * (subpic->i_stop - subpic->i_start) / 4;
 
             if (fade_start <= render_date && fade_start < subpic->i_stop)
                 fade_alpha = 255 * (subpic->i_stop - render_date) /