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
4dbce51b
Commit
4dbce51b
authored
Oct 30, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: allow pass 3
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ccc09185
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
ffmpeg.c
ffmpeg.c
+14
-12
No files found.
ffmpeg.c
View file @
4dbce51b
...
@@ -2247,15 +2247,7 @@ static int transcode_init(OutputFile *output_files, int nb_output_files,
...
@@ -2247,15 +2247,7 @@ static int transcode_init(OutputFile *output_files, int nb_output_files,
snprintf
(
logfilename
,
sizeof
(
logfilename
),
"%s-%d.log"
,
snprintf
(
logfilename
,
sizeof
(
logfilename
),
"%s-%d.log"
,
pass_logfilename_prefix
?
pass_logfilename_prefix
:
DEFAULT_PASS_LOGFILENAME_PREFIX
,
pass_logfilename_prefix
?
pass_logfilename_prefix
:
DEFAULT_PASS_LOGFILENAME_PREFIX
,
i
);
i
);
if
(
codec
->
flags
&
CODEC_FLAG_PASS1
)
{
if
(
codec
->
flags
&
CODEC_FLAG_PASS2
)
{
f
=
fopen
(
logfilename
,
"wb"
);
if
(
!
f
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Cannot write log file '%s' for pass-1 encoding: %s
\n
"
,
logfilename
,
strerror
(
errno
));
exit_program
(
1
);
}
ost
->
logfile
=
f
;
}
else
{
char
*
logbuffer
;
char
*
logbuffer
;
size_t
logbuffer_size
;
size_t
logbuffer_size
;
if
(
read_file
(
logfilename
,
&
logbuffer
,
&
logbuffer_size
)
<
0
)
{
if
(
read_file
(
logfilename
,
&
logbuffer
,
&
logbuffer_size
)
<
0
)
{
...
@@ -2265,6 +2257,15 @@ static int transcode_init(OutputFile *output_files, int nb_output_files,
...
@@ -2265,6 +2257,15 @@ static int transcode_init(OutputFile *output_files, int nb_output_files,
}
}
codec
->
stats_in
=
logbuffer
;
codec
->
stats_in
=
logbuffer
;
}
}
if
(
codec
->
flags
&
CODEC_FLAG_PASS1
)
{
f
=
fopen
(
logfilename
,
"wb"
);
if
(
!
f
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Cannot write log file '%s' for pass-1 encoding: %s
\n
"
,
logfilename
,
strerror
(
errno
));
exit_program
(
1
);
}
ost
->
logfile
=
f
;
}
}
}
}
}
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
){
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
){
...
@@ -3466,9 +3467,10 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
...
@@ -3466,9 +3467,10 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
/* two pass mode */
/* two pass mode */
if
(
do_pass
)
{
if
(
do_pass
)
{
if
(
do_pass
==
1
)
{
if
(
do_pass
&
1
)
{
video_enc
->
flags
|=
CODEC_FLAG_PASS1
;
video_enc
->
flags
|=
CODEC_FLAG_PASS1
;
}
else
{
}
if
(
do_pass
&
2
)
{
video_enc
->
flags
|=
CODEC_FLAG_PASS2
;
video_enc
->
flags
|=
CODEC_FLAG_PASS2
;
}
}
}
}
...
@@ -3969,7 +3971,7 @@ static void opt_output_file(void *optctx, const char *filename)
...
@@ -3969,7 +3971,7 @@ static void opt_output_file(void *optctx, const char *filename)
/* same option as mencoder */
/* same option as mencoder */
static
int
opt_pass
(
const
char
*
opt
,
const
char
*
arg
)
static
int
opt_pass
(
const
char
*
opt
,
const
char
*
arg
)
{
{
do_pass
=
parse_number_or_die
(
opt
,
arg
,
OPT_INT
,
1
,
2
);
do_pass
=
parse_number_or_die
(
opt
,
arg
,
OPT_INT
,
1
,
3
);
return
0
;
return
0
;
}
}
...
...
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