Commit 66df6e22 authored by Steve Lhomme's avatar Steve Lhomme

filters: allow the filter owner not to provide pictures

In that case the internal allocator of the default allocator are used.
parent c98af497
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment