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
a470fe80
Commit
a470fe80
authored
Oct 21, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libspeexdec: return meaningful error codes
parent
14bc60db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
libspeexdec.c
libavcodec/libspeexdec.c
+3
-3
No files found.
libavcodec/libspeexdec.c
View file @
a470fe80
...
...
@@ -60,14 +60,14 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
mode
=
speex_lib_get_mode
(
s
->
header
->
mode
);
if
(
!
mode
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unknown Speex mode %d"
,
s
->
header
->
mode
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
}
else
av_log
(
avctx
,
AV_LOG_INFO
,
"Missing Speex header, assuming defaults.
\n
"
);
if
(
avctx
->
channels
>
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only stereo and mono are supported.
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
speex_bits_init
(
&
s
->
bits
);
...
...
@@ -128,7 +128,7 @@ static int libspeex_decode_frame(AVCodecContext *avctx,
ret
=
speex_decode_int
(
s
->
dec_state
,
&
s
->
bits
,
output
);
if
(
ret
<=
-
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error decoding Speex frame.
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
avctx
->
channels
==
2
)
speex_decode_stereo_int
(
output
,
s
->
frame_size
,
&
s
->
stereo
);
...
...
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