]> git.sesse.net Git - mlt/commitdiff
pixbuf: support alt. query syntax begin:value for melt
authorDan Dennedy <dan@dennedy.org>
Tue, 6 Nov 2012 04:51:27 +0000 (20:51 -0800)
committerDan Dennedy <dan@dennedy.org>
Tue, 6 Nov 2012 04:51:27 +0000 (20:51 -0800)
src/modules/gtk2/producer_pixbuf.c
src/modules/gtk2/producer_pixbuf.yml

index 1e922e7713519a38de7de5db7e2b3aca546183c5..dbece63517771edaedb7daeb0d426a1db3ac2719 100644 (file)
@@ -227,13 +227,16 @@ static int load_sequence_querystring( producer_pixbuf self, mlt_properties prope
        int result = 0;
 
        // Obtain filenames with pattern and begin value in query string
-       if ( strchr( filename, '%' ) && strchr( filename, '?' ) && strstr( filename, "begin=" ) )
+       if ( strchr( filename, '%' ) && strchr( filename, '?' ) )
        {
                // Split filename into pattern and query string
                char *s = strdup( filename );
                char *querystring = strrchr( s, '?' );
                *querystring++ = '\0';
-               mlt_properties_set( properties, "begin", strstr( querystring, "begin=" ) + 6 );
+               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 );
index b9652852f23b8d7aa8bc8054f65b834500f1a20d..70bbd145ff323f7bffefbf6723fa9061fea3ff24 100644 (file)
@@ -30,8 +30,8 @@ parameters:
         filename from a counter for multi-file/flipbook animation. The file 
         sequence ends when numeric discontinuity >100.
         
-        If the file sequence does not begin within the count of 100,
-        you can pass the begin property like a query string paramter, for
+        If the file sequence does not begin within the count of 100 you
+        can pass the begin property like a query string parameter, for
         example: anim-%04d.png?begin=1000.
         
         If filename contains "/.all.", suffix with an extension to load all