Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r--src/opus_decoder.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 13a910f4..dbdf49f3 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -937,14 +937,18 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...)
case OPUS_GET_BANDWIDTH_REQUEST:
{
opus_int32 *value = va_arg(ap, opus_int32*);
- if (!value) goto bad_arg;
+ if (!value) {
+ goto bad_arg;
+ }
*value = st->bandwidth;
}
break;
case OPUS_GET_FINAL_RANGE_REQUEST:
{
opus_uint32 *value = va_arg(ap, opus_uint32*);
- if (!value) goto bad_arg;
+ if (!value) {
+ goto bad_arg;
+ }
*value = st->rangeFinal;
}
break;
@@ -963,14 +967,18 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...)
case OPUS_GET_SAMPLE_RATE_REQUEST:
{
opus_int32 *value = va_arg(ap, opus_int32*);
- if (!value) goto bad_arg;
+ if (!value) {
+ goto bad_arg;
+ }
*value = st->Fs;
}
break;
case OPUS_GET_PITCH_REQUEST:
{
opus_int32 *value = va_arg(ap, opus_int32*);
- if (!value) goto bad_arg;
+ if (!value) {
+ goto bad_arg;
+ }
if (st->prev_mode == MODE_CELT_ONLY)
celt_decoder_ctl(celt_dec, OPUS_GET_PITCH(value));
else
@@ -980,21 +988,27 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...)
case OPUS_GET_GAIN_REQUEST:
{
opus_int32 *value = va_arg(ap, opus_int32*);
- if (!value) goto bad_arg;
+ if (!value) {
+ goto bad_arg;
+ }
*value = st->decode_gain;
}
break;
case OPUS_SET_GAIN_REQUEST:
{
opus_int32 value = va_arg(ap, opus_int32);
- if (value<-32768 || value>32767) goto bad_arg;
+ if (value<-32768 || value>32767) {
+ goto bad_arg;
+ }
st->decode_gain = value;
}
break;
case OPUS_GET_LAST_PACKET_DURATION_REQUEST:
{
opus_uint32 *value = va_arg(ap, opus_uint32*);
- if (!value) goto bad_arg;
+ if (!value) {
+ goto bad_arg;
+ }
*value = st->last_packet_duration;
}
break;