Commit 0a974b87 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* utf8_fopen for a few more modules refs #880

parent 187982c2
...@@ -297,7 +297,7 @@ static void Trigger (access_t *access) ...@@ -297,7 +297,7 @@ static void Trigger (access_t *access)
msg_Info (access, "dumping media to \"%s\"...", filename); msg_Info (access, "dumping media to \"%s\"...", filename);
newstream = fopen (filename, "wb"); newstream = utf8_fopen (filename, "wb");
if (newstream == NULL) if (newstream == NULL)
{ {
msg_Err (access, "cannot create dump file \"%s\": %s", filename, msg_Err (access, "cannot create dump file \"%s\": %s", filename,
......
...@@ -520,7 +520,7 @@ int load_preset_file(char * pathname, preset_t * preset) { ...@@ -520,7 +520,7 @@ int load_preset_file(char * pathname, preset_t * preset) {
return FAILURE; return FAILURE;
/* Open the file corresponding to pathname */ /* Open the file corresponding to pathname */
if ((fs = fopen(pathname, "r")) == 0) { if ((fs = utf8_fopen(pathname, "r")) == 0) {
if (PRESET_DEBUG) printf("load_preset_file: loading of file %s failed!\n", pathname); if (PRESET_DEBUG) printf("load_preset_file: loading of file %s failed!\n", pathname);
return ERROR; return ERROR;
} }
...@@ -792,7 +792,7 @@ void savePreset(char * filename) { ...@@ -792,7 +792,7 @@ void savePreset(char * filename) {
return; return;
/* Open the file corresponding to pathname */ /* Open the file corresponding to pathname */
if ((fs = fopen(filename, "w+")) == 0) { if ((fs = utf8_fopen(filename, "w+")) == 0) {
if (PRESET_DEBUG) printf("savePreset: failed to create filename \"%s\"!\n", filename); if (PRESET_DEBUG) printf("savePreset: failed to create filename \"%s\"!\n", filename);
return; return;
} }
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "video_output.h" #include "video_output.h"
#include "vlc_image.h" #include "vlc_image.h"
#include "vlc_spu.h" #include "vlc_spu.h"
#include "charset.h"
#include <snapshot.h> #include <snapshot.h>
...@@ -633,14 +634,14 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -633,14 +634,14 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
/* /*
* Did the user specify a directory? If not, path = NULL. * Did the user specify a directory? If not, path = NULL.
*/ */
path = opendir ( (const char *)val.psz_string ); path = utf8_opendir ( (const char *)val.psz_string );
if ( path != NULL ) if ( path != NULL )
{ {
char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" ); char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" );
if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" ); if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" );
closedir( path ); vlc_closedir_wrapper( path );
if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE ) if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE )
{ {
int i_num = var_GetInteger( p_vout, "snapshot-num" ); int i_num = var_GetInteger( p_vout, "snapshot-num" );
...@@ -650,7 +651,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -650,7 +651,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
asprintf( &psz_filename, "%s/%s%05d.%s", val.psz_string, asprintf( &psz_filename, "%s/%s%05d.%s", val.psz_string,
psz_prefix, i_num++, format.psz_string ); psz_prefix, i_num++, format.psz_string );
} }
while( ( p_file = fopen( psz_filename, "r" ) ) && !fclose( p_file ) ); while( ( p_file = utf8_fopen( psz_filename, "r" ) ) && !fclose( p_file ) );
var_SetInteger( p_vout, "snapshot-num", i_num ); var_SetInteger( p_vout, "snapshot-num", i_num );
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment