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
930c7664
Commit
930c7664
authored
Jan 17, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file audio output: write on stdout if filename is "-"
parent
a9b77da4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/audio_output/file.c
modules/audio_output/file.c
+10
-4
No files found.
modules/audio_output/file.c
View file @
930c7664
...
...
@@ -101,7 +101,7 @@ static int format_int[] = { VLC_FOURCC('u','8',' ',' '),
VLC_FOURCC
(
's'
,
'p'
,
'i'
,
'f'
)
};
#define FILE_TEXT N_("Output file")
#define FILE_LONGTEXT N_("File to which the audio samples will be written to.")
#define FILE_LONGTEXT N_("File to which the audio samples will be written to.
(\"-\" for stdout
")
vlc_module_begin
();
set_description
(
_
(
"File audio output"
)
);
...
...
@@ -154,7 +154,11 @@ static int Open( vlc_object_t * p_this )
return
VLC_EGENERIC
;
}
p_aout
->
output
.
p_sys
->
p_file
=
utf8_fopen
(
psz_name
,
"wb"
);
if
(
!
strcmp
(
psz_name
,
"-"
)
)
p_aout
->
output
.
p_sys
->
p_file
=
stdout
;
else
p_aout
->
output
.
p_sys
->
p_file
=
utf8_fopen
(
psz_name
,
"wb"
);
free
(
psz_name
);
if
(
p_aout
->
output
.
p_sys
->
p_file
==
NULL
)
{
...
...
@@ -182,7 +186,8 @@ static int Open( vlc_object_t * p_this )
{
msg_Err
(
p_aout
,
"cannot understand the format string (%s)"
,
psz_format
);
fclose
(
p_aout
->
output
.
p_sys
->
p_file
);
if
(
p_aout
->
output
.
p_sys
->
p_file
!=
stdout
)
fclose
(
p_aout
->
output
.
p_sys
->
p_file
);
free
(
p_aout
->
output
.
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -309,7 +314,8 @@ static void Close( vlc_object_t * p_this )
}
}
fclose
(
p_aout
->
output
.
p_sys
->
p_file
);
if
(
p_aout
->
output
.
p_sys
->
p_file
!=
stdout
)
fclose
(
p_aout
->
output
.
p_sys
->
p_file
);
free
(
p_aout
->
output
.
p_sys
);
}
...
...
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