Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1f5efdb6
Commit
1f5efdb6
authored
Nov 04, 2006
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow non-ANSI CP characters in files created by stream output
parent
e0cbe2c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
modules/access_output/file.c
modules/access_output/file.c
+25
-8
No files found.
modules/access_output/file.c
View file @
1f5efdb6
...
@@ -129,10 +129,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -129,10 +129,9 @@ static int Open( vlc_object_t *p_this )
}
}
else
else
{
{
char
*
psz_localname
=
ToLocale
(
p_access
->
psz_name
);
char
*
psz_tmp
,
*
psz_tmp2
,
*
psz_localname
,
*
psz_rewriten
;
char
*
psz_tmp
,
*
psz_tmp2
,
*
psz_rewriten
;
int
fd
,
i
,
i_length
=
strlen
(
p_access
->
psz_name
);
int
fd
,
i
,
i_length
=
strlen
(
psz_localname
);
for
(
i
=
0
,
psz_tmp
=
p_access
->
psz_name
;
for
(
i
=
0
,
psz_tmp
=
psz_localname
;
(
psz_tmp
=
strstr
(
psz_tmp
,
"%T"
)
)
;
psz_tmp
++
,
i
++
)
(
psz_tmp
=
strstr
(
psz_tmp
,
"%T"
)
)
;
psz_tmp
++
,
i
++
)
;
;
if
(
i
)
if
(
i
)
...
@@ -141,7 +140,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -141,7 +140,7 @@ static int Open( vlc_object_t *p_this )
psz_rewriten
=
(
char
*
)
malloc
(
i_length
);
psz_rewriten
=
(
char
*
)
malloc
(
i_length
);
if
(
!
psz_rewriten
)
if
(
!
psz_rewriten
)
return
(
VLC_EGENERIC
);
return
(
VLC_EGENERIC
);
psz_tmp
=
p
sz_local
name
;
psz_tmp
=
p
_access
->
psz_
name
;
psz_tmp2
=
psz_rewriten
;
psz_tmp2
=
psz_rewriten
;
while
(
*
psz_tmp
)
while
(
*
psz_tmp
)
{
{
...
@@ -156,15 +155,33 @@ static int Open( vlc_object_t *p_this )
...
@@ -156,15 +155,33 @@ static int Open( vlc_object_t *p_this )
*
psz_tmp2
++
=
*
psz_tmp
++
;
*
psz_tmp2
++
=
*
psz_tmp
++
;
}
}
*
psz_tmp2
=
*
psz_tmp
;
*
psz_tmp2
=
*
psz_tmp
;
fd
=
open
(
psz_rewriten
,
i_flags
,
0666
);
LocaleFree
(
psz_localname
);
free
(
psz_rewriten
);
}
}
else
else
{
{
psz_rewriten
=
p_access
->
psz_name
;
}
#if defined (WIN32)
if
(
GetVersion
()
<
0x80000000
)
{
/* for Windows NT and above */
wchar_t
wpath
[
MAX_PATH
+
1
];
if
(
!
MultiByteToWideChar
(
CP_UTF8
,
0
,
psz_rewriten
,
-
1
,
wpath
,
MAX_PATH
)
)
return
VLC_EGENERIC
;
wpath
[
MAX_PATH
]
=
L'\0'
;
fd
=
_wopen
(
wpath
,
i_flags
,
0666
);
}
else
#endif
{
psz_localname
=
ToLocale
(
psz_rewriten
);
fd
=
open
(
psz_localname
,
i_flags
,
0666
);
fd
=
open
(
psz_localname
,
i_flags
,
0666
);
LocaleFree
(
psz_localname
);
LocaleFree
(
psz_localname
);
}
}
if
(
i
)
free
(
psz_rewriten
);
if
(
fd
==
-
1
)
if
(
fd
==
-
1
)
{
{
msg_Err
(
p_access
,
"cannot open `%s' (%s)"
,
p_access
->
psz_name
,
msg_Err
(
p_access
,
"cannot open `%s' (%s)"
,
p_access
->
psz_name
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment