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
a4b62f36
Commit
a4b62f36
authored
Dec 28, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
soxdec: use meaningful error codes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
09401694
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
soxdec.c
libavformat/soxdec.c
+3
-3
No files found.
libavformat/soxdec.c
View file @
a4b62f36
...
...
@@ -75,12 +75,12 @@ static int sox_read_header(AVFormatContext *s)
if
(
comment_size
>
0xFFFFFFFFU
-
SOX_FIXED_HDR
-
4U
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"invalid comment size (%u)
\n
"
,
comment_size
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
sample_rate
<=
0
||
sample_rate
>
INT_MAX
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"invalid sample rate (%f)
\n
"
,
sample_rate
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
sample_rate_frac
=
sample_rate
-
floor
(
sample_rate
);
...
...
@@ -92,7 +92,7 @@ static int sox_read_header(AVFormatContext *s)
if
((
header_size
+
4
)
&
7
||
header_size
<
SOX_FIXED_HDR
+
comment_size
||
st
->
codec
->
channels
>
65535
)
/* Reserve top 16 bits */
{
av_log
(
s
,
AV_LOG_ERROR
,
"invalid header
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
comment_size
&&
comment_size
<
UINT_MAX
)
{
...
...
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