diff options
author | Ralph Giles <giles@mozilla.com> | 2012-12-11 10:17:11 -0800 |
---|---|---|
committer | Ralph Giles <giles@mozilla.com> | 2012-12-11 10:17:11 -0800 |
commit | 256c9595d8004c9f414b6e7a3b6936b705c2c6b2 (patch) | |
tree | bea8eed470c514273fc92269d2d387de2b664a20 /include | |
parent | 8eb9bb793976cf62e315416e9f42809bed909244 (diff) | |
download | libopus-256c9595d8004c9f414b6e7a3b6936b705c2c6b2.tar.gz |
Document that opus_packet_get_nb_frames, etc. can return OPUS_BAD_ARG.
NB they only check for len < 1, not for null data.
Diffstat (limited to 'include')
-rw-r--r-- | include/opus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/opus.h b/include/opus.h index 847a07c1..02033a9d 100644 --- a/include/opus.h +++ b/include/opus.h @@ -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); |