[vlc-devel] [PATCH 11/14] filter_chain: use an empty callback owner for intermediate filters
Steve Lhomme
robux4 at ycbcr.xyz
Tue Sep 17 16:22:39 CEST 2019
This way we can use filter_NewPicture() which will use the allocator of
the filter if there is one.
---
src/misc/filter_chain.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index d759941a8d4..d0b08fc69eb 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -102,7 +102,10 @@ static picture_t *filter_chain_VideoBufferNew( filter_t *filter )
{
// HACK as intermediate filters may not have the same video format as
// the last one handled by the owner
- pic = picture_NewFromFormat( &filter->fmt_out.video );
+ filter_owner_t saved_owner = filter->owner;
+ filter->owner = (filter_owner_t) {};
+ pic = filter_NewPicture( filter );
+ filter->owner = saved_owner;
if( pic == NULL )
msg_Err( filter, "Failed to allocate picture" );
}
--
2.17.1
More information about the vlc-devel
mailing list