[vlc-commits] filter_chain: only set the filter callbacks for video

Steve Lhomme git at videolan.org
Wed Sep 18 09:06:10 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jul 25 09:43:23 2019 +0200| [2e680ef51fbe675cfd38988694949786268bb8a5] | committer: Steve Lhomme

filter_chain: only set the filter callbacks for video

SPU doesn't use callbacks to get the subpictures from an the owner.

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

 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 )



More information about the vlc-commits mailing list