Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
082ff1ef
Commit
082ff1ef
authored
Mar 02, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Locale fixes (refs #528) + clean up
parent
4d4cf035
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
modules/access_output/file.c
modules/access_output/file.c
+22
-19
No files found.
modules/access_output/file.c
View file @
082ff1ef
...
...
@@ -34,6 +34,7 @@
#include <vlc/vlc.h>
#include <vlc/sout.h>
#include "charset.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
...
...
@@ -101,28 +102,22 @@ static int Open( vlc_object_t *p_this )
sout_CfgParse
(
p_access
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_access
->
p_cfg
);
if
(
!
(
p_access
->
p_sys
=
malloc
(
sizeof
(
sout_access_out_sys_t
)
)
)
)
{
msg_Err
(
p_access
,
"out of memory"
);
return
(
VLC_EGENERIC
);
}
if
(
!
p_access
->
psz_name
)
{
msg_Err
(
p_access
,
"no file name specified"
);
return
VLC_EGENERIC
;
}
i_flags
=
O_RDWR
|
O_CREAT
|
O_LARGEFILE
;
var_Get
(
p_access
,
SOUT_CFG_PREFIX
"append"
,
&
val
);
if
(
val
.
b_bool
)
{
i_flags
|=
O_APPEND
;
}
else
if
(
!
(
p_access
->
p_sys
=
malloc
(
sizeof
(
sout_access_out_sys_t
)
)
)
)
{
i_flags
|=
O_TRUNC
;
return
(
VLC_ENOMEM
)
;
}
i_flags
=
O_RDWR
|
O_CREAT
|
O_LARGEFILE
;
var_Get
(
p_access
,
SOUT_CFG_PREFIX
"append"
,
&
val
);
i_flags
|=
val
.
b_bool
?
O_APPEND
:
O_TRUNC
;
if
(
!
strcmp
(
p_access
->
psz_name
,
"-"
)
)
{
#if defined(WIN32)
...
...
@@ -131,12 +126,20 @@ static int Open( vlc_object_t *p_this )
p_access
->
p_sys
->
i_handle
=
STDOUT_FILENO
;
msg_Dbg
(
p_access
,
"using stdout"
);
}
else
if
(
(
p_access
->
p_sys
->
i_handle
=
open
(
p_access
->
psz_name
,
i_flags
,
0666
)
)
==
-
1
)
else
{
msg_Err
(
p_access
,
"cannot open `%s'"
,
p_access
->
psz_name
);
free
(
p_access
->
p_sys
);
return
(
VLC_EGENERIC
);
const
char
*
psz_localname
=
ToLocale
(
p_access
->
psz_name
);
int
fd
=
open
(
psz_localname
,
i_flags
,
0666
);
LocaleFree
(
psz_localname
);
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open `%s' (%s)"
,
p_access
->
psz_name
,
strerror
(
errno
)
);
free
(
p_access
->
p_sys
);
return
(
VLC_EGENERIC
);
}
p_access
->
p_sys
->
i_handle
=
fd
;
}
p_access
->
pf_write
=
Write
;
...
...
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