+ if ( mlt_properties_count( self->filenames ) > 0 )
+ {
+ mlt_properties_set_int( properties, "ttl", 1 );
+ result = 1;
+ }
+ }
+ return result;
+}
+
+static int load_sequence_deprecated( producer_pixbuf self, mlt_properties properties, const char *filename )
+{
+ int result = 0;
+ const char *start;
+
+ // This approach is deprecated in favor of the begin querystring parameter.
+ // Obtain filenames with pattern containing a begin value, e.g. foo%1234d.png
+ if ( ( start = strchr( filename, '%' ) ) )
+ {
+ const char *end = ++start;
+ while ( isdigit( *end ) ) end++;
+ if ( end > start && ( end[0] == 'd' || end[0] == 'i' || end[0] == 'u' ) )
+ {
+ int n = end - start;
+ char *s = calloc( 1, n + 1 );
+ strncpy( s, start, n );
+ mlt_properties_set( properties, "begin", s );
+ free( s );
+ s = calloc( 1, strlen( filename ) + 2 );
+ strncpy( s, filename, start - filename );
+ sprintf( s + ( start - filename ), ".%d%s", n, end );
+ result = load_sequence_sprintf( self, properties, s );
+ free( s );
+ }
+ }
+ return result;
+}
+
+static int load_sequence_querystring( producer_pixbuf self, mlt_properties properties, const char *filename )
+{
+ int result = 0;
+
+ // Obtain filenames with pattern and begin value in query string
+ if ( strchr( filename, '%' ) && strchr( filename, '?' ) )
+ {
+ // Split filename into pattern and query string
+ char *s = strdup( filename );
+ char *querystring = strrchr( s, '?' );
+ *querystring++ = '\0';
+ if ( strstr( filename, "begin=" ) )
+ mlt_properties_set( properties, "begin", strstr( querystring, "begin=" ) + 6 );
+ else if ( strstr( filename, "begin:" ) )
+ mlt_properties_set( properties, "begin", strstr( querystring, "begin:" ) + 6 );
+ // Coerce to an int value so serialization does not have any extra query string cruft
+ mlt_properties_set_int( properties, "begin", mlt_properties_get_int( properties, "begin" ) );
+ result = load_sequence_sprintf( self, properties, s );
+ free( s );