[vlc-commits] spu: remove filter_DeleteSubpicture()

Rémi Denis-Courmont git at videolan.org
Thu Oct 30 16:27:30 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 30 17:25:25 2014 +0200| [3512e4087ed65b10ba9166ae1e3ba001ef19e76c] | committer: Rémi Denis-Courmont

spu: remove filter_DeleteSubpicture()

This is only used in error corner cases, and is always the same as
calling subpicture_Delete() directly.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3512e4087ed65b10ba9166ae1e3ba001ef19e76c
---

 include/vlc_filter.h                   |   18 ++----------------
 modules/video_filter/audiobargraph_v.c |    2 +-
 modules/video_filter/logo.c            |    2 +-
 modules/video_filter/marq.c            |    2 +-
 modules/video_filter/mosaic.c          |    2 +-
 modules/video_filter/remoteosd.c       |    2 +-
 modules/video_filter/rss.c             |    2 +-
 src/video_output/vout_subpictures.c    |    7 -------
 8 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index 4aebe8b..8e02361 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -50,7 +50,6 @@ typedef struct filter_owner_t
         struct
         {
             subpicture_t * (*buffer_new)( filter_t * );
-            void           (*buffer_del)( filter_t *, subpicture_t * );
         } sub;
     };
 } filter_owner_t;
@@ -181,8 +180,8 @@ static inline void filter_FlushPictures( filter_t *p_filter )
 
 /**
  * This function will return a new subpicture usable by p_filter as an output
- * buffer. You have to release it using filter_DeleteSubpicture or by returning
- * it to the caller as a pf_sub_source return value.
+ * buffer. You have to release it using subpicture_Delete or by returning it to
+ * the caller as a pf_sub_source return value.
  * Provided for convenience.
  *
  * \param p_filter filter_t object
@@ -197,19 +196,6 @@ static inline subpicture_t *filter_NewSubpicture( filter_t *p_filter )
 }
 
 /**
- * This function will release a subpicture create by filter_NewSubicture.
- * Provided for convenience.
- *
- * \param p_filter filter_t object
- * \param p_subpicture to be released
- */
-static inline void filter_DeleteSubpicture( filter_t *p_filter,
-                                            subpicture_t *subpic )
-{
-    p_filter->owner.sub.buffer_del( p_filter, subpic );
-}
-
-/**
  * This function gives all input attachments at once.
  *
  * You MUST release the returned values
diff --git a/modules/video_filter/audiobargraph_v.c b/modules/video_filter/audiobargraph_v.c
index 8cb5565..bde9b08 100644
--- a/modules/video_filter/audiobargraph_v.c
+++ b/modules/video_filter/audiobargraph_v.c
@@ -400,7 +400,7 @@ static subpicture_t *FilterSub(filter_t *p_filter, mtime_t date)
     p_region = subpicture_region_New(&fmt);
     if (!p_region) {
         msg_Err(p_filter, "cannot allocate SPU region");
-        filter_DeleteSubpicture(p_filter, p_spu);
+        subpicture_Delete(p_spu);
         p_spu = NULL;
         goto exit;
     }
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index 12e14ab..a41055e 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -390,7 +390,7 @@ static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
     if( !p_region )
     {
         msg_Err( p_filter, "cannot allocate SPU region" );
-        filter_DeleteSubpicture( p_filter, p_spu );
+        subpicture_Delete( p_spu );
         p_spu = NULL;
         goto exit;
     }
diff --git a/modules/video_filter/marq.c b/modules/video_filter/marq.c
index 550ce7d..9618c7c 100644
--- a/modules/video_filter/marq.c
+++ b/modules/video_filter/marq.c
@@ -303,7 +303,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     p_spu->p_region = subpicture_region_New( &fmt );
     if( !p_spu->p_region )
     {
-        filter_DeleteSubpicture( p_filter, p_spu );
+        subpicture_Delete( p_spu );
         p_spu = NULL;
         goto out;
     }
diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c
index 7ed5dc4..56b695b 100644
--- a/modules/video_filter/mosaic.c
+++ b/modules/video_filter/mosaic.c
@@ -648,7 +648,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
         if( !p_region )
         {
             msg_Err( p_filter, "cannot allocate SPU region" );
-            filter_DeleteSubpicture( p_filter, p_spu );
+            subpicture_Delete( p_spu );
             vlc_global_unlock( VLC_MOSAIC_MUTEX );
             vlc_mutex_unlock( &p_sys->lock );
             return p_spu;
diff --git a/modules/video_filter/remoteosd.c b/modules/video_filter/remoteosd.c
index 836ade6..9a4e6e5 100644
--- a/modules/video_filter/remoteosd.c
+++ b/modules/video_filter/remoteosd.c
@@ -1131,7 +1131,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     if( !p_region )
     {
         msg_Err( p_filter, "cannot allocate SPU region" );
-        filter_DeleteSubpicture( p_filter, p_spu );
+        subpicture_Delete( p_spu );
         vlc_mutex_unlock( &p_sys->lock );
         return NULL;
     }
diff --git a/modules/video_filter/rss.c b/modules/video_filter/rss.c
index b8b97cd..b641023 100644
--- a/modules/video_filter/rss.c
+++ b/modules/video_filter/rss.c
@@ -414,7 +414,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     p_spu->p_region = subpicture_region_New( &fmt );
     if( !p_spu->p_region )
     {
-        filter_DeleteSubpicture( p_filter, p_spu );
+        subpicture_Delete( p_spu );
         vlc_mutex_unlock( &p_sys->lock );
         return NULL;
     }
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 09bac67..544bb5c 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1155,12 +1155,6 @@ static subpicture_t *sub_new_buffer(filter_t *filter)
     return subpicture;
 }
 
-static void sub_del_buffer(filter_t *filter, subpicture_t *subpic)
-{
-    VLC_UNUSED(filter);
-    subpicture_Delete(subpic);
-}
-
 static int SubSourceInit(filter_t *filter, void *data)
 {
     spu_t *spu = data;
@@ -1168,7 +1162,6 @@ static int SubSourceInit(filter_t *filter, void *data)
 
     filter->owner.sys = (void *)(intptr_t)channel;
     filter->owner.sub.buffer_new = sub_new_buffer;
-    filter->owner.sub.buffer_del = sub_del_buffer;
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list