From e10df35d1daef05e1fee1e7cc939c07f05580783 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Thu, 29 Jan 2009 05:06:08 +0000 Subject: [PATCH 1/1] producer_fezzik.c: do not use the swscale filter on images wider than 2048 loaded by the sdl_image producer. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1332 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/modules/fezzik/producer_fezzik.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/modules/fezzik/producer_fezzik.c b/src/modules/fezzik/producer_fezzik.c index 2f3af7a..816c1bd 100644 --- a/src/modules/fezzik/producer_fezzik.c +++ b/src/modules/fezzik/producer_fezzik.c @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -105,6 +106,13 @@ static mlt_producer create_producer( mlt_profile profile, char *file ) static void create_filter( mlt_profile profile, mlt_producer producer, char *effect, int *created ) { + // The swscale filter can not handle images with a width > 2048 and the + // sdl_image producer does not scale on its own + if ( strncmp( effect, "swscale", 7 ) == 0 && + mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "_real_width" ) > 2048 && + strcmp( mlt_properties_get( MLT_PRODUCER_PROPERTIES( producer ), "mlt_service" ), "sdl_image" ) == 0 ) + return; + char *id = strdup( effect ); char *arg = strchr( id, ':' ); if ( arg != NULL ) -- 1.7.4.4