[vlc-commits] filters: allow the filter owner not to provide pictures
Steve Lhomme
git at videolan.org
Wed Sep 18 09:06:19 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 19 13:45:53 2019 +0200| [66df6e220eb3c5c5689a35fd60f3d00a29e45baa] | committer: Steve Lhomme
filters: allow the filter owner not to provide pictures
In that case the internal allocator of the default allocator are used.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66df6e220eb3c5c5689a35fd60f3d00a29e45baa
---
include/vlc_filter.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index 0bc10e9199..6363ccf304 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -161,11 +161,14 @@ struct filter_t
*/
static inline picture_t *filter_NewPicture( filter_t *p_filter )
{
- picture_t *pic;
+ picture_t *pic = NULL;
if ( p_filter->owner.video != NULL && p_filter->owner.video->buffer_new != NULL)
pic = p_filter->owner.video->buffer_new( p_filter );
- else
+ if ( pic == NULL )
+ {
+ // legacy filter owners not setting a default filter_allocator
pic = picture_NewFromFormat( &p_filter->fmt_out.video );
+ }
if( pic == NULL )
msg_Warn( p_filter, "can't get output picture" );
return pic;
More information about the vlc-commits
mailing list