Permalink
Browse files

Fix file names with ext. chars on Windows for luma files.

  • Loading branch information...
1 parent edf3a24 commit 987f195ba3d341743ad45fca0d2b6173cba14f6e @ddennedy ddennedy committed May 24, 2014
Showing with 10 additions and 2 deletions.
  1. +5 −1 src/modules/core/transition_composite.c
  2. +5 −1 src/modules/core/transition_luma.c
@@ -673,8 +673,12 @@ static uint16_t* get_luma( mlt_transition self, mlt_properties properties, int w
// See if it is a PGM
if ( extension != NULL && strcmp( extension, ".pgm" ) == 0 )
{
+ // Convert file name string encoding.
+ mlt_properties_set( properties, "_luma_utf8", resource );
+ mlt_properties_from_utf8( properties, "_luma_utf8", "_luma_local8" );
+
// Open PGM
- FILE *f = fopen( resource, "rb" );
+ FILE *f = fopen( mlt_properties_get( properties, "_luma_local8" ), "rb" );
if ( f != NULL )
{
// Load from PGM
@@ -366,8 +366,12 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
// See if it is a PGM
if ( extension != NULL && strcmp( extension, ".pgm" ) == 0 )
{
+ // Convert file name string encoding.
+ mlt_properties_set( properties, "_resource_utf8", resource );
+ mlt_properties_from_utf8( properties, "_resource_utf8", "_resource_local8" );
+
// Open PGM
- FILE *f = fopen( resource, "rb" );
+ FILE *f = fopen( mlt_properties_get( properties, "_resource_local8" ), "rb" );
if ( f != NULL )
{
// Load from PGM

0 comments on commit 987f195

Please sign in to comment.