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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Alexander Traud
Opus
Commits
256c9595
Commit
256c9595
authored
12 years ago
by
Ralph Giles
Browse files
Options
Downloads
Patches
Plain Diff
Document that opus_packet_get_nb_frames, etc. can return OPUS_BAD_ARG.
NB they only check for len < 1, not for null data.
parent
8eb9bb79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/opus.h
+3
-0
3 additions, 0 deletions
include/opus.h
with
3 additions
and
0 deletions
include/opus.h
+
3
−
0
View file @
256c9595
...
...
@@ -566,6 +566,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsign
* @param [in] packet <tt>char*</tt>: Opus packet
* @param [in] len <tt>opus_int32</tt>: Length of packet
* @returns Number of frames
* @retval OPUS_BAD_ARG Insufficient data was passed to the function
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT
OPUS_WARN_UNUSED_RESULT
int
opus_packet_get_nb_frames
(
const
unsigned
char
packet
[],
opus_int32
len
)
OPUS_ARG_NONNULL
(
1
);
...
...
@@ -577,6 +578,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned
* This must be a multiple of 400, or
* inaccurate results will be returned.
* @returns Number of samples
* @retval OPUS_BAD_ARG Insufficient data was passed to the function
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT
OPUS_WARN_UNUSED_RESULT
int
opus_packet_get_nb_samples
(
const
unsigned
char
packet
[],
opus_int32
len
,
opus_int32
Fs
)
OPUS_ARG_NONNULL
(
1
);
...
...
@@ -586,6 +588,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigne
* @param [in] packet <tt>char*</tt>: Opus packet
* @param [in] len <tt>opus_int32</tt>: Length of packet
* @returns Number of samples
* @retval OPUS_BAD_ARG Insufficient data was passed to the function
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT
OPUS_WARN_UNUSED_RESULT
int
opus_decoder_get_nb_samples
(
const
OpusDecoder
*
dec
,
const
unsigned
char
packet
[],
opus_int32
len
)
OPUS_ARG_NONNULL
(
1
)
OPUS_ARG_NONNULL
(
2
);
...
...
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