- /* Update the output picture size */
- p_spu->p_blend->fmt_out.video.i_width =
- p_spu->p_blend->fmt_out.video.i_visible_width = p_fmt->i_width;
- p_spu->p_blend->fmt_out.video.i_height =
- p_spu->p_blend->fmt_out.video.i_visible_height = p_fmt->i_height;
+ /* Compute alpha blend value */
+ i_fade_alpha = 255;
+ if( p_subpic->b_fade )
+ {
+ mtime_t i_fade_start = ( p_subpic->i_stop +
+ p_subpic->i_start ) / 2;
+ mtime_t i_now = mdate();
+ if( i_now >= i_fade_start && p_subpic->i_stop > i_fade_start )
+ {
+ i_fade_alpha = 255 * ( p_subpic->i_stop - i_now ) /
+ ( p_subpic->i_stop - i_fade_start );
+ }
+ }
+
+ /* Update the blender */
+ SpuRenderUpdateBlend( p_spu, p_fmt->i_width, p_fmt->i_height, &p_region->fmt );