[vlc-devel] [PATCH 01/14] filter_chain: only set the filter callbacks for video

Steve Lhomme robux4 at ycbcr.xyz
Thu Jul 25 12:34:00 CEST 2019


SPU doesn't use callbacks to get the subpictures from an the owner.
---
 src/misc/filter_chain.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 75e103af6d..df70fe7f5d 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -139,7 +139,6 @@ filter_chain_t *filter_chain_NewVideo( vlc_object_t *obj, bool allow_change,
                                        const filter_owner_t *restrict owner )
 {
     filter_owner_t callbacks = {
-        .video = &filter_chain_video_cbs,
         .sys = obj,
     };
 
@@ -210,8 +209,13 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
     filter->p_cfg = cfg;
     filter->psz_name = name;
 
-    filter->owner = chain->callbacks;
-    filter->owner.sys = chain;
+    if (fmt_in->i_cat == VIDEO_ES)
+    {
+        filter->owner.video = &filter_chain_video_cbs;
+        filter->owner.sys = chain;
+    }
+    else
+        filter->owner.sub = NULL;
 
     assert( capability != NULL );
     if( name != NULL && filter->b_allow_fmt_out_change )
-- 
2.17.1



More information about the vlc-devel mailing list