X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_filter.c;h=3d814296ff70bf359dc0de8bb1df59e02b708b84;hb=9c7b399431ffc490bf0dac9833a301f76f433623;hp=9472cc3477a7eecdb5533497ad8ef73774bb5060;hpb=f00476101550ec7d8e863f6516aa83bc1b524570;p=melted diff --git a/src/framework/mlt_filter.c b/src/framework/mlt_filter.c index 9472cc3..3d81429 100644 --- a/src/framework/mlt_filter.c +++ b/src/framework/mlt_filter.c @@ -3,23 +3,21 @@ * Copyright (C) 2003-2004 Ushodaya Enterprises Limited * Author: Charles Yates * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" - #include "mlt_filter.h" #include "mlt_frame.h" @@ -147,7 +145,8 @@ mlt_position mlt_filter_get_out( mlt_filter this ) mlt_frame mlt_filter_process( mlt_filter this, mlt_frame frame ) { - if ( this->process == NULL ) + int disable = mlt_properties_get_int( MLT_FILTER_PROPERTIES( this ), "disable" ); + if ( disable || this->process == NULL ) return frame; else return this->process( this, frame ); @@ -169,7 +168,7 @@ static int filter_get_frame( mlt_service service, mlt_frame_ptr frame, int index mlt_service producer = mlt_service_producer( &this->parent ); // If the frame request is for this filters track, we need to process it - if ( index == track ) + if ( index == track || track == -1 ) { int ret = mlt_service_get_frame( producer, frame, index ); if ( ret == 0 ) @@ -181,7 +180,7 @@ static int filter_get_frame( mlt_service service, mlt_frame_ptr frame, int index } else { - *frame = mlt_frame_init( ); + *frame = mlt_frame_init( service ); return 0; } }