Skip to content

Commit

Permalink
pixbuf: support alt. query syntax begin:value for melt
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Nov 6, 2012
1 parent a8e893b commit 2ef7d12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/modules/gtk2/producer_pixbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/modules/gtk2/producer_pixbuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ef7d12

Please sign in to comment.