Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7748dd41
Commit
7748dd41
authored
Jul 31, 2013
by
Vittorio Giovara
Committed by
Martin Storsjö
Jul 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: add -n option to immediately exit when output files already exist
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
b85dbe68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
Changelog
Changelog
+1
-0
avconv_opt.c
avconv_opt.c
+9
-1
avconv.texi
doc/avconv.texi
+3
-0
No files found.
Changelog
View file @
7748dd41
...
...
@@ -25,6 +25,7 @@ version 10:
- support for WavPack muxing (raw and in Matroska)
- Go2Webinar decoder
- WavPack encoding through libwavpack
- Added the -n parameter to avconv
version 9:
...
...
avconv_opt.c
View file @
7748dd41
...
...
@@ -71,6 +71,7 @@ int print_stats = 1;
int
qp_hist
=
0
;
static
int
file_overwrite
=
0
;
static
int
file_skip
=
0
;
static
int
video_discard
=
0
;
static
int
intra_dc_precision
=
8
;
static
int
using_stdin
=
0
;
...
...
@@ -508,11 +509,16 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
static
void
assert_file_overwrite
(
const
char
*
filename
)
{
if
(
file_overwrite
&&
file_skip
)
{
fprintf
(
stderr
,
"Error, both -y and -n supplied. Exiting.
\n
"
);
exit_program
(
1
);
}
if
(
!
file_overwrite
&&
(
strchr
(
filename
,
':'
)
==
NULL
||
filename
[
1
]
==
':'
||
av_strstart
(
filename
,
"file:"
,
NULL
)))
{
if
(
avio_check
(
filename
,
0
)
==
0
)
{
if
(
!
using_stdin
)
{
if
(
!
using_stdin
&&
!
file_skip
)
{
fprintf
(
stderr
,
"File '%s' already exists. Overwrite ? [y/N] "
,
filename
);
fflush
(
stderr
);
if
(
!
read_yesno
())
{
...
...
@@ -2113,6 +2119,8 @@ const OptionDef options[] = {
"force format"
,
"fmt"
},
{
"y"
,
OPT_BOOL
,
{
&
file_overwrite
},
"overwrite output files"
},
{
"n"
,
OPT_BOOL
,
{
&
file_skip
},
"never overwrite output files"
},
{
"c"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
|
OPT_INPUT
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
codec_names
)
},
"codec name"
,
"codec"
},
...
...
doc/avconv.texi
View file @
7748dd41
...
...
@@ -233,6 +233,9 @@ input file name
@item -y (@emph
{
global
}
)
Overwrite output files without asking.
@item -n (@emph
{
global
}
)
Immediately exit when output files already exist.
@item -c[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@itemx -codec[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
Select an encoder (when used before an output file) or a decoder (when used
...
...
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