spu: fix ugly cast in filter chain (and unexport function)
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 28 Jul 2014 20:29:37 +0000 (23:29 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 28 Jul 2014 21:25:10 +0000 (00:25 +0300)
include/vlc_filter.h
src/libvlccore.sym
src/misc/filter_chain.c
src/video_output/vout_subpictures.c

index ff13032..eb474eb 100644 (file)
@@ -400,7 +400,7 @@ VLC_API block_t * filter_chain_AudioFilter( filter_chain_t *, block_t * );
  * \param p_chain pointer to filter chain
  * \param display_date of subpictures
  */
-VLC_API void filter_chain_SubSource( filter_chain_t *, mtime_t );
+void filter_chain_SubSource( filter_chain_t *, spu_t *, mtime_t );
 
 /**
  * Apply filter chain to subpictures.
index 325c8f6..4bc681c 100644 (file)
@@ -128,7 +128,6 @@ filter_chain_MouseFilter
 filter_chain_MouseEvent
 filter_chain_New
 filter_chain_Reset
-filter_chain_SubSource
 filter_chain_SubFilter
 filter_chain_VideoFilter
 filter_chain_VideoFlush
index 79a00fa..c9b56a0 100644 (file)
@@ -335,16 +335,15 @@ block_t *filter_chain_AudioFilter( filter_chain_t *p_chain, block_t *p_block )
     return p_block;
 }
 
-void filter_chain_SubSource( filter_chain_t *p_chain,
+void filter_chain_SubSource( filter_chain_t *p_chain, spu_t *spu,
                              mtime_t display_date )
 {
     for( chained_filter_t *f = p_chain->first; f != NULL; f = f->next )
     {
         filter_t *p_filter = &f->filter;
         subpicture_t *p_subpic = p_filter->pf_sub_source( p_filter, display_date );
-        /* XXX I find that spu_t cast ugly */
         if( p_subpic )
-            spu_PutSubpicture( (spu_t*)p_chain->p_this, p_subpic );
+            spu_PutSubpicture( spu, p_subpic );
     }
 }
 
index 11ed17d..c8651f9 100644 (file)
@@ -1441,7 +1441,7 @@ subpicture_t *spu_Render(spu_t *spu,
         free(chain_update);
     }
     /* Run subpicture sources */
-    filter_chain_SubSource(sys->source_chain, render_osd_date);
+    filter_chain_SubSource(sys->source_chain, spu, render_osd_date);
     vlc_mutex_unlock(&sys->source_chain_lock);
 
     static const vlc_fourcc_t chroma_list_default_yuv[] = {