Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Commits
69bcb28d
Verified
Commit
69bcb28d
authored
7 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Some missing checks
parent
3995a0c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/opus_decoder.c
+2
-0
2 additions, 0 deletions
src/opus_decoder.c
src/opus_multistream_decoder.c
+1
-1
1 addition, 1 deletion
src/opus_multistream_decoder.c
with
3 additions
and
1 deletion
src/opus_decoder.c
+
2
−
0
View file @
69bcb28d
...
@@ -769,6 +769,7 @@ int opus_decode_float(OpusDecoder *st, const unsigned char *data,
...
@@ -769,6 +769,7 @@ int opus_decode_float(OpusDecoder *st, const unsigned char *data,
else
else
return
OPUS_INVALID_PACKET
;
return
OPUS_INVALID_PACKET
;
}
}
celt_assert
(
st
->
channels
==
1
||
st
->
channels
==
2
);
ALLOC
(
out
,
frame_size
*
st
->
channels
,
opus_int16
);
ALLOC
(
out
,
frame_size
*
st
->
channels
,
opus_int16
);
ret
=
opus_decode_native
(
st
,
data
,
len
,
out
,
frame_size
,
decode_fec
,
0
,
NULL
,
0
);
ret
=
opus_decode_native
(
st
,
data
,
len
,
out
,
frame_size
,
decode_fec
,
0
,
NULL
,
0
);
...
@@ -806,6 +807,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
...
@@ -806,6 +807,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
else
else
return
OPUS_INVALID_PACKET
;
return
OPUS_INVALID_PACKET
;
}
}
celt_assert
(
st
->
channels
==
1
||
st
->
channels
==
2
);
ALLOC
(
out
,
frame_size
*
st
->
channels
,
float
);
ALLOC
(
out
,
frame_size
*
st
->
channels
,
float
);
ret
=
opus_decode_native
(
st
,
data
,
len
,
out
,
frame_size
,
decode_fec
,
0
,
NULL
,
1
);
ret
=
opus_decode_native
(
st
,
data
,
len
,
out
,
frame_size
,
decode_fec
,
0
,
NULL
,
1
);
...
...
This diff is collapsed.
Click to expand it.
src/opus_multistream_decoder.c
+
1
−
1
View file @
69bcb28d
...
@@ -202,7 +202,7 @@ int opus_multistream_decode_native(
...
@@ -202,7 +202,7 @@ int opus_multistream_decode_native(
VALIDATE_MS_DECODER
(
st
);
VALIDATE_MS_DECODER
(
st
);
/* Limit frame_size to avoid excessive stack allocations. */
/* Limit frame_size to avoid excessive stack allocations. */
opus_multistream_decoder_ctl
(
st
,
OPUS_GET_SAMPLE_RATE
(
&
Fs
));
MUST_SUCCEED
(
opus_multistream_decoder_ctl
(
st
,
OPUS_GET_SAMPLE_RATE
(
&
Fs
))
)
;
frame_size
=
IMIN
(
frame_size
,
Fs
/
25
*
3
);
frame_size
=
IMIN
(
frame_size
,
Fs
/
25
*
3
);
ALLOC
(
buf
,
2
*
frame_size
,
opus_val16
);
ALLOC
(
buf
,
2
*
frame_size
,
opus_val16
);
ptr
=
(
char
*
)
st
+
align
(
sizeof
(
OpusMSDecoder
));
ptr
=
(
char
*
)
st
+
align
(
sizeof
(
OpusMSDecoder
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment