summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/mlt/files/mlt-0.2.4-sox1410.patch')
-rw-r--r--media-libs/mlt/files/mlt-0.2.4-sox1410.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/media-libs/mlt/files/mlt-0.2.4-sox1410.patch b/media-libs/mlt/files/mlt-0.2.4-sox1410.patch
new file mode 100644
index 000000000000..04de618ec935
--- /dev/null
+++ b/media-libs/mlt/files/mlt-0.2.4-sox1410.patch
@@ -0,0 +1,60 @@
+Index: mlt-0.2.4/src/modules/sox/filter_sox.c
+===================================================================
+--- mlt-0.2.4.orig/src/modules/sox/filter_sox.c
++++ mlt-0.2.4/src/modules/sox/filter_sox.c
+@@ -38,7 +38,11 @@
+ # define ST_LIB_VERSION_CODE SOX_LIB_VERSION_CODE
+ # define ST_LIB_VERSION SOX_LIB_VERSION
+ # define ST_SIGNED_WORD_TO_SAMPLE(d,clips) SOX_SIGNED_16BIT_TO_SAMPLE(d,clips)
++#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0)
+ # define ST_SSIZE_MIN SOX_SSIZE_MIN
++#else
++# define ST_SSIZE_MIN (SOX_SIZE_MAX/2)
++#endif
+ # define ST_SAMPLE_TO_SIGNED_WORD(d,clips) SOX_SAMPLE_TO_SIGNED_16BIT(d,clips)
+ #else
+ # include <st.h>
+@@ -91,7 +95,11 @@ static int create_effect( mlt_filter thi
+ // Locate the effect
+ #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)
+ sox_create_effect( eff, sox_find_effect( tokeniser->tokens[0] ) );
++#else
++ eff = sox_create_effect( sox_find_effect( tokeniser->tokens[0] ) );
++#endif
+ int opt_count = tokeniser->count - 1;
+ #else
+ int opt_count = st_geteffect_opt( eff, tokeniser->count, tokeniser->tokens );
+@@ -108,10 +116,17 @@ static int create_effect( mlt_filter thi
+ #endif
+ {
+ // Set the sox signal parameters
++#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0)
+ eff->ininfo.rate = frequency;
+ eff->outinfo.rate = frequency;
+ eff->ininfo.channels = 1;
+ eff->outinfo.channels = 1;
++#else
++ eff->in_signal.rate = frequency;
++ eff->out_signal.rate = frequency;
++ eff->in_signal.channels = 1;
++ eff->out_signal.channels = 1;
++#endif
+
+ // Start the effect
+ #ifdef SOX14
+@@ -214,8 +229,13 @@ static int filter_get_audio( mlt_frame f
+ eff_t e = mlt_properties_get_data( filter_properties, id, NULL );
+
+ // Validate the existing effect state
++#if ST_LIB_VERSION_CODE < ST_LIB_VERSION(14,1,0)
+ if ( e != NULL && ( e->ininfo.rate != *frequency ||
+ e->outinfo.rate != *frequency ) )
++#else
++ if ( e != NULL && ( e->in_signal.rate != *frequency ||
++ e->out_signal.rate != *frequency ) )
++#endif
+ e = NULL;
+
+ // (Re)Create the effect state