]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_subpictures.c
libvlccore: Don't set the priority on first thread on Mac OS X.
[vlc] / src / video_output / vout_subpictures.c
index 8e4f3da5517cdfa6322d2d316be05765486360db..723df0de363d0e931dfe6fa1edb4d9348a0c30f8 100644 (file)
@@ -225,6 +225,8 @@ void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach )
 static void RegionPictureRelease( picture_t *p_pic )
 {
     free( p_pic->p_data_orig );
+    /* We use pf_release nullity to know if the picture has already been released. */
+    p_pic->pf_release = NULL;
 }
 subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
                                          video_format_t *p_fmt )
@@ -957,9 +959,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
             p_subpic_v = p_subpic_v->p_next )
     {
         if( p_subpic_v->pf_pre_render )
-        {
-            p_subpic_v->pf_pre_render( p_fmt, p_spu, p_subpic_v, mdate() );
-        }
+            p_subpic_v->pf_pre_render( p_fmt, p_spu, p_subpic_v );
     }
 
     if( i_scale_width_orig <= 0 )
@@ -996,11 +996,6 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
 
         if( p_subpic->pf_update_regions )
         {
-            /* FIXME that part look like crap too if there is more than 1 region */
-
-            if( p_subpic->p_region )
-                spu_DestroyRegion( p_spu, p_subpic->p_region );
-
             /* TODO do not reverse the scaling that was done before calling
              * spu_RenderSubpictures, just pass it along (or do it inside
              * spu_RenderSubpictures) */
@@ -1010,7 +1005,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
             fmt_org.i_height =
             fmt_org.i_visible_height = i_source_video_height;
 
-            p_subpic->p_region = p_subpic->pf_update_regions( &fmt_org, p_spu, p_subpic, mdate() );
+            p_subpic->pf_update_regions( &fmt_org, p_spu, p_subpic, mdate() );
         }
 
         /* */