- }
-
- if( p_subpic == NULL ||
- ( p_vout->render.b_allow_modify_pics && !p_pic->i_refcount ) )
- {
- vout_RenderSubPictures( p_vout, p_pic, p_subpic );
- CopyPicture( p_vout, p_pic, PP_OUTPUTPICTURE[0] );
- }
- else if( PP_OUTPUTPICTURE[0]->b_slow )
- {
- /* The picture buffer is in slow memory. We'll use
- * the "2 * VOUT_MAX_PICTURES + 1" picture as a temporary
- * one for subpictures rendering. */
- picture_t *p_tmp_pic = &p_vout->p_picture[2 * VOUT_MAX_PICTURES];
- if( p_tmp_pic->i_status == FREE_PICTURE )
- {
- vout_AllocatePicture( VLC_OBJECT(p_vout),
- p_tmp_pic, p_vout->render.i_chroma,
- p_vout->render.i_width,
- p_vout->render.i_height,
- p_vout->render.i_aspect );
- p_tmp_pic->i_type = MEMORY_PICTURE;
- p_tmp_pic->i_status = RESERVED_PICTURE;
- }
-
- CopyPicture( p_vout, p_pic, p_tmp_pic );
-
- vout_RenderSubPictures( p_vout, p_tmp_pic, p_subpic );
-
- CopyPicture( p_vout, p_tmp_pic, PP_OUTPUTPICTURE[0] );
- }
- else
- {
- CopyPicture( p_vout, p_pic, PP_OUTPUTPICTURE[0] );