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
becdce99
Commit
becdce99
authored
Sep 27, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: factorize common code from new_*_stream()
parent
d159060a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
avconv.c
avconv.c
+3
-17
No files found.
avconv.c
View file @
becdce99
...
...
@@ -2976,6 +2976,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
st
->
codec
->
global_quality
=
FF_QP2LAMBDA
*
qscale
;
}
if
(
oc
->
oformat
->
flags
&
AVFMT_GLOBALHEADER
)
st
->
codec
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
ost
->
sws_flags
=
av_get_int
(
sws_opts
,
"sws_flags"
,
NULL
);
return
ost
;
}
...
...
@@ -3007,10 +3010,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
st
=
ost
->
st
;
video_enc
=
st
->
codec
;
if
(
oc
->
oformat
->
flags
&
AVFMT_GLOBALHEADER
)
{
video_enc
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
}
if
(
!
st
->
stream_copy
)
{
const
char
*
p
=
NULL
;
char
*
forced_key_frames
=
NULL
,
*
frame_rate
=
NULL
,
*
frame_size
=
NULL
;
...
...
@@ -3128,9 +3127,6 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc)
audio_enc
=
st
->
codec
;
audio_enc
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
if
(
oc
->
oformat
->
flags
&
AVFMT_GLOBALHEADER
)
{
audio_enc
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
}
if
(
!
st
->
stream_copy
)
{
char
*
sample_fmt
=
NULL
;
...
...
@@ -3153,20 +3149,14 @@ static OutputStream *new_data_stream(OptionsContext *o, AVFormatContext *oc)
{
AVStream
*
st
;
OutputStream
*
ost
;
AVCodecContext
*
data_enc
;
ost
=
new_output_stream
(
o
,
oc
,
AVMEDIA_TYPE_DATA
);
st
=
ost
->
st
;
data_enc
=
st
->
codec
;
if
(
!
st
->
stream_copy
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Data stream encoding not supported yet (only streamcopy)
\n
"
);
exit_program
(
1
);
}
if
(
oc
->
oformat
->
flags
&
AVFMT_GLOBALHEADER
)
{
data_enc
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
}
return
ost
;
}
...
...
@@ -3182,10 +3172,6 @@ static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc)
subtitle_enc
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
if
(
oc
->
oformat
->
flags
&
AVFMT_GLOBALHEADER
)
{
subtitle_enc
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
}
return
ost
;
}
...
...
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