From: j-b-m Date: Sun, 28 Dec 2008 20:43:00 +0000 (+0000) Subject: filter_sox.c: fix crash when trying to create a sox filter with wrong name X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=516812ea2298e2033e177a088da893eda65f8c65;p=mlt filter_sox.c: fix crash when trying to create a sox filter with wrong name git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1296 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/sox/filter_sox.c b/src/modules/sox/filter_sox.c index 42bf8128..66cc54d3 100644 --- a/src/modules/sox/filter_sox.c +++ b/src/modules/sox/filter_sox.c @@ -106,7 +106,9 @@ static int create_effect( mlt_filter this, char *value, int count, int channel, #ifdef SOX14 //fprintf(stderr, "%s: effect %s count %d\n", __FUNCTION__, tokeniser->tokens[0], tokeniser->count ); #if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(14,1,0)) - eff_t eff = sox_create_effect( sox_find_effect( tokeniser->tokens[0] ) ); + sox_effect_handler_t const *eff_handle = sox_find_effect( tokeniser->tokens[0] ); + if (eff_handle == NULL ) return error; + eff_t eff = sox_create_effect( eff_handle ); effect_destructor = ( mlt_destructor ) delete_effect; sox_encodinginfo_t *enc = calloc( 1, sizeof( sox_encodinginfo_t ) ); enc->encoding = SOX_ENCODING_SIGN2;