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
f64e0a2f
Commit
f64e0a2f
authored
Oct 11, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apedec: return meaningful error codes from ape_decode_init()
parent
75007813
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
apedec.c
libavcodec/apedec.c
+4
-4
No files found.
libavcodec/apedec.c
View file @
f64e0a2f
...
...
@@ -182,15 +182,15 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
if
(
avctx
->
extradata_size
!=
6
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Incorrect extradata
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
if
(
avctx
->
bits_per_coded_sample
!=
16
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only 16-bit samples are supported
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
if
(
avctx
->
channels
>
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only mono and stereo is supported
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
s
->
avctx
=
avctx
;
s
->
channels
=
avctx
->
channels
;
...
...
@@ -201,7 +201,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Compression Level: %d - Flags: %d
\n
"
,
s
->
compression_level
,
s
->
flags
);
if
(
s
->
compression_level
%
1000
||
s
->
compression_level
>
COMPRESSION_LEVEL_INSANE
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Incorrect compression level %d
\n
"
,
s
->
compression_level
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
s
->
fset
=
s
->
compression_level
/
1000
-
1
;
for
(
i
=
0
;
i
<
APE_FILTER_LEVELS
;
i
++
)
{
...
...
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