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)
msg_Info (access, "dumping media to \"%s\"...", filename);
newstream = fopen (filename, "wb");
newstream = utf8_fopen (filename, "wb");
if (newstream == NULL)
{
msg_Err (access, "cannot create dump file \"%s\": %s", filename,
......
......@@ -520,7 +520,7 @@ int load_preset_file(char * pathname, preset_t * preset) {
return FAILURE;
/* 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);
return ERROR;
}
......@@ -792,7 +792,7 @@ void savePreset(char * filename) {
return;
/* 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);
return;
}
......
......@@ -36,6 +36,7 @@
#include "video_output.h"
#include "vlc_image.h"
#include "vlc_spu.h"
#include "charset.h"
#include <snapshot.h>
......@@ -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.
*/
path = opendir ( (const char *)val.psz_string );
path = utf8_opendir ( (const char *)val.psz_string );
if ( path != NULL )
{
char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" );
if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" );
closedir( path );
vlc_closedir_wrapper( path );
if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE )
{
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 )
asprintf( &psz_filename, "%s/%s%05d.%s", val.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 );
}
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