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
4059cd39
Commit
4059cd39
authored
Dec 01, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/ffmenc: Remove the last use of st->codec
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
78519a00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
ffmenc.c
libavformat/ffmenc.c
+4
-6
No files found.
libavformat/ffmenc.c
View file @
4059cd39
...
...
@@ -148,11 +148,11 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecParameters *ctxpar
#undef ENC
}
static
int
ffm_write_recommended_config
(
AVIOContext
*
pb
,
AVCodec
Context
*
ctx
,
unsigned
tag
,
static
int
ffm_write_recommended_config
(
AVIOContext
*
pb
,
AVCodec
Parameters
*
codecpar
,
unsigned
tag
,
const
char
*
configuration
)
{
int
ret
;
const
AVCodec
*
enc
=
ctx
->
codec
?
ctx
->
codec
:
avcodec_find_encoder
(
ctx
->
codec_id
);
const
AVCodec
*
enc
=
avcodec_find_encoder
(
codecpar
->
codec_id
);
AVIOContext
*
tmp
;
AVDictionaryEntry
*
t
=
NULL
;
AVDictionary
*
all
=
NULL
,
*
comm
=
NULL
,
*
prv
=
NULL
;
...
...
@@ -207,7 +207,6 @@ static int ffm_write_header(AVFormatContext *s)
FFMContext
*
ffm
=
s
->
priv_data
;
AVStream
*
st
;
AVIOContext
*
pb
=
s
->
pb
;
AVCodecContext
*
codec
;
AVCodecParameters
*
codecpar
;
int
bit_rate
,
i
,
ret
;
...
...
@@ -242,7 +241,6 @@ static int ffm_write_header(AVFormatContext *s)
if
(
avio_open_dyn_buf
(
&
pb
)
<
0
)
return
AVERROR
(
ENOMEM
);
codec
=
st
->
codec
;
codecpar
=
st
->
codecpar
;
/* generic info */
avio_wb32
(
pb
,
codecpar
->
codec_id
);
...
...
@@ -271,7 +269,7 @@ static int ffm_write_header(AVFormatContext *s)
if
(
st
->
recommended_encoder_configuration
)
{
av_log
(
NULL
,
AV_LOG_DEBUG
,
"writing recommended configuration: %s
\n
"
,
st
->
recommended_encoder_configuration
);
if
((
ret
=
ffm_write_recommended_config
(
s
->
pb
,
codec
,
MKBETAG
(
'S'
,
'2'
,
'V'
,
'I'
),
if
((
ret
=
ffm_write_recommended_config
(
s
->
pb
,
codec
par
,
MKBETAG
(
'S'
,
'2'
,
'V'
,
'I'
),
st
->
recommended_encoder_configuration
))
<
0
)
return
ret
;
}
else
if
((
ret
=
ffm_write_header_codec_ctx
(
s
->
pb
,
codecpar
,
MKBETAG
(
'S'
,
'2'
,
'V'
,
'I'
),
AV_OPT_FLAG_VIDEO_PARAM
))
<
0
)
...
...
@@ -281,7 +279,7 @@ static int ffm_write_header(AVFormatContext *s)
if
(
st
->
recommended_encoder_configuration
)
{
av_log
(
NULL
,
AV_LOG_DEBUG
,
"writing recommended configuration: %s
\n
"
,
st
->
recommended_encoder_configuration
);
if
((
ret
=
ffm_write_recommended_config
(
s
->
pb
,
codec
,
MKBETAG
(
'S'
,
'2'
,
'A'
,
'U'
),
if
((
ret
=
ffm_write_recommended_config
(
s
->
pb
,
codec
par
,
MKBETAG
(
'S'
,
'2'
,
'A'
,
'U'
),
st
->
recommended_encoder_configuration
))
<
0
)
return
ret
;
}
else
if
((
ret
=
ffm_write_header_codec_ctx
(
s
->
pb
,
codecpar
,
MKBETAG
(
'S'
,
'2'
,
'A'
,
'U'
),
AV_OPT_FLAG_AUDIO_PARAM
))
<
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