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
ee4d43ef
Commit
ee4d43ef
authored
Jan 06, 2012
by
Oana Stratulat
Committed by
Clément Bœsch
Jan 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: check if number of input and output channels are valid.
Fix Ticket887.
parent
95afa0a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
ffmpeg.c
ffmpeg.c
+8
-2
No files found.
ffmpeg.c
View file @
ee4d43ef
...
...
@@ -1096,8 +1096,14 @@ need_realloc:
av_opt_set_int
(
ost
->
swr
,
"icl"
,
av_get_default_channel_layout
(
ost
->
audio_channels_mapped
),
0
);
av_opt_set_int
(
ost
->
swr
,
"uch"
,
ost
->
audio_channels_mapped
,
0
);
}
av_opt_set_int
(
ost
->
swr
,
"ich"
,
dec
->
channels
,
0
);
av_opt_set_int
(
ost
->
swr
,
"och"
,
enc
->
channels
,
0
);
if
(
av_opt_set_int
(
ost
->
swr
,
"ich"
,
dec
->
channels
,
0
)
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Unsupported number of input channels
\n
"
);
exit_program
(
1
);
}
if
(
av_opt_set_int
(
ost
->
swr
,
"och"
,
enc
->
channels
,
0
)
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Unsupported number of output channels
\n
"
);
exit_program
(
1
);
}
if
(
audio_sync_method
>
1
)
av_opt_set_int
(
ost
->
swr
,
"flags"
,
SWR_FLAG_RESAMPLE
,
0
);
if
(
ost
->
swr
&&
swr_init
(
ost
->
swr
)
<
0
){
av_log
(
NULL
,
AV_LOG_FATAL
,
"swr_init() failed
\n
"
);
...
...
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