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
19878374
Commit
19878374
authored
May 16, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: initialize input_codec array earlier.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5319f48a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
ffmpeg.c
ffmpeg.c
+6
-0
No files found.
ffmpeg.c
View file @
19878374
...
...
@@ -3378,6 +3378,8 @@ static void opt_input_file(const char *filename)
switch
(
dec
->
codec_type
)
{
case
AVMEDIA_TYPE_AUDIO
:
input_codecs
[
nb_input_codecs
-
1
]
=
avcodec_find_decoder_by_name
(
audio_codec_name
);
if
(
!
input_codecs
[
nb_input_codecs
-
1
])
input_codecs
[
nb_input_codecs
-
1
]
=
avcodec_find_decoder
(
dec
->
codec_id
);
set_context_opts
(
dec
,
avcodec_opts
[
AVMEDIA_TYPE_AUDIO
],
AV_OPT_FLAG_AUDIO_PARAM
|
AV_OPT_FLAG_DECODING_PARAM
,
input_codecs
[
nb_input_codecs
-
1
]);
channel_layout
=
dec
->
channel_layout
;
audio_channels
=
dec
->
channels
;
...
...
@@ -3393,6 +3395,8 @@ static void opt_input_file(const char *filename)
break
;
case
AVMEDIA_TYPE_VIDEO
:
input_codecs
[
nb_input_codecs
-
1
]
=
avcodec_find_decoder_by_name
(
video_codec_name
);
if
(
!
input_codecs
[
nb_input_codecs
-
1
])
input_codecs
[
nb_input_codecs
-
1
]
=
avcodec_find_decoder
(
dec
->
codec_id
);
set_context_opts
(
dec
,
avcodec_opts
[
AVMEDIA_TYPE_VIDEO
],
AV_OPT_FLAG_VIDEO_PARAM
|
AV_OPT_FLAG_DECODING_PARAM
,
input_codecs
[
nb_input_codecs
-
1
]);
frame_height
=
dec
->
height
;
frame_width
=
dec
->
width
;
...
...
@@ -3430,6 +3434,8 @@ static void opt_input_file(const char *filename)
break
;
case
AVMEDIA_TYPE_SUBTITLE
:
input_codecs
[
nb_input_codecs
-
1
]
=
avcodec_find_decoder_by_name
(
subtitle_codec_name
);
if
(
!
input_codecs
[
nb_input_codecs
-
1
])
input_codecs
[
nb_input_codecs
-
1
]
=
avcodec_find_decoder
(
dec
->
codec_id
);
if
(
subtitle_disable
)
st
->
discard
=
AVDISCARD_ALL
;
break
;
...
...
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