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
3f35190f
Commit
3f35190f
authored
Sep 07, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* file: added an append option. (The default is to overwrite the file)
parent
b9ea8dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
modules/access_output/file.c
modules/access_output/file.c
+12
-2
No files found.
modules/access_output/file.c
View file @
3f35190f
...
...
@@ -2,7 +2,7 @@
* file.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: file.c,v 1.
8 2003/06/21 14:24:30 gbazin
Exp $
* $Id: file.c,v 1.
9 2003/09/07 20:08:31 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -81,6 +81,7 @@ struct sout_access_out_sys_t
static
int
Open
(
vlc_object_t
*
p_this
)
{
sout_access_out_t
*
p_access
=
(
sout_access_out_t
*
)
p_this
;
int
i_flags
;
if
(
!
(
p_access
->
p_sys
=
malloc
(
sizeof
(
sout_access_out_sys_t
)
)
)
)
{
...
...
@@ -93,13 +94,22 @@ static int Open( vlc_object_t *p_this )
msg_Err
(
p_access
,
"no file name specified"
);
return
VLC_EGENERIC
;
}
i_flags
=
O_WRONLY
|
O_CREAT
;
if
(
sout_cfg_find_value
(
p_access
->
p_cfg
,
"append"
)
)
{
i_flags
|=
O_APPEND
;
}
else
{
i_flags
|=
O_TRUNC
;
}
if
(
!
strcmp
(
p_access
->
psz_name
,
"-"
)
)
{
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
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
open
(
p_access
->
psz_name
,
i_flags
,
S_IWRITE
|
S_IREAD
|
S_IRGRP
|
S_IROTH
)
)
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open `%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