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
0cd13834
Commit
0cd13834
authored
Mar 21, 2011
by
Tomas Härdin
Committed by
Michael Niedermayer
Mar 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve channel count and bitrate error handling in wmav* encode_init()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
2fd41c90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
wmaenc.c
libavcodec/wmaenc.c
+10
-4
No files found.
libavcodec/wmaenc.c
View file @
0cd13834
...
...
@@ -33,11 +33,17 @@ static int encode_init(AVCodecContext * avctx){
s
->
avctx
=
avctx
;
if
(
avctx
->
channels
>
MAX_CHANNELS
)
return
-
1
;
if
(
avctx
->
channels
>
MAX_CHANNELS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"too many channels: got %i, need %i or fewer"
,
avctx
->
channels
,
MAX_CHANNELS
);
return
AVERROR
(
EINVAL
);
}
if
(
avctx
->
bit_rate
<
24
*
1000
)
return
-
1
;
if
(
avctx
->
bit_rate
<
24
*
1000
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"bitrate too low: got %i, need 24000 or higher
\n
"
,
avctx
->
bit_rate
);
return
AVERROR
(
EINVAL
);
}
/* extract flag infos */
flags1
=
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