]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_rescale.c
Add service locks for parallelism.
[mlt] / src / modules / core / filter_rescale.c
index 546914babd33f73c4a1143f044814edb2052cbfd..4b5a32efcdf5c5d9a60d039e951f636d180be4e3 100644 (file)
@@ -148,6 +148,8 @@ static void scale_alpha( mlt_frame this, int iwidth, int iheight, int owidth, in
 
 static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable )
 {
+       int error = 0;
+       
        // Get the frame properties
        mlt_properties properties = MLT_FRAME_PROPERTIES( this );
 
@@ -220,8 +222,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        
                if ( *image && strcmp( interps, "none" ) && ( iwidth != owidth || iheight != oheight ) )
                {
-                       mlt_log_debug( MLT_FILTER_SERVICE( filter ), "%dx%d -> %dx%d (%s)\n",
-                               iwidth, iheight, owidth, oheight, mlt_image_format_name( *format ) );
+                       mlt_log_debug( MLT_FILTER_SERVICE( filter ), "%dx%d -> %dx%d (%s) %s\n",
+                               iwidth, iheight, owidth, oheight, mlt_image_format_name( *format ), interps );
 
                        // If valid colorspace
                        if ( *format == mlt_image_yuv422 || *format == mlt_image_rgb24 ||
@@ -246,20 +248,10 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        }
        else
        {
-               // Store the requested width/height
-               int iwidth = *width;
-               int iheight = *height;
-
-               // Get the image as requested
-               mlt_frame_get_image( this, image, format, &iwidth, &iheight, writable );
-
-               // Too small - for now just assign as though we got what we wanted
-               *width = iwidth;
-               *height = iheight;
+               error = 1;
        }
 
-
-       return 0;
+       return error;
 }
 
 /** Filter processing.