]> git.sesse.net Git - mlt/commitdiff
Better signal previous/next frames not needed.
authorDan Dennedy <dan@dennedy.org>
Wed, 7 Apr 2010 03:32:43 +0000 (20:32 -0700)
committerDan Dennedy <dan@dennedy.org>
Wed, 7 Apr 2010 03:32:43 +0000 (20:32 -0700)
src/modules/xine/filter_deinterlace.c

index c7341afd911dc2f33614b4269fe3c96ec6984d65..c1da374e333d70b520319ac12e0be3e48b4a707d 100644 (file)
@@ -50,7 +50,7 @@ int deinterlace_yadif( mlt_frame frame, mlt_filter filter, uint8_t **image, mlt_
 
        if ( !previous_frame || !next_frame )
                return 1;
-       
+
        // Get the preceding frame's image
        int error = mlt_frame_get_image( previous_frame, &previous_image, format, &previous_width, &previous_height, 0 );
        
@@ -176,8 +176,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                if ( error || ( method > DEINTERLACE_NONE && method < DEINTERLACE_YADIF ) )
                {
                        // Signal that we no longer need previous and next frames
-                       mlt_producer producer = mlt_producer_cut_parent( mlt_frame_get_original_producer(this) );
-                       mlt_properties_set_int( MLT_PRODUCER_PROPERTIES(producer), "_need_previous_next", 0 );
+                       mlt_service service = mlt_properties_get_data( MLT_FILTER_PROPERTIES(filter), "service", NULL );
+                       mlt_properties_set_int( MLT_SERVICE_PROPERTIES(service), "_need_previous_next", 0 );
                        
                        if ( error )
                                method = DEINTERLACE_ONEFIELD;
@@ -214,6 +214,10 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        }
        else
        {
+               // Signal that we no longer need previous and next frames
+               mlt_service service = mlt_properties_get_data( MLT_FILTER_PROPERTIES(filter), "service", NULL );
+               mlt_properties_set_int( MLT_SERVICE_PROPERTIES(service), "_need_previous_next", 0 );
+
                // Pass through
                error = mlt_frame_get_image( this, image, format, width, height, writable );
        }