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:
authorGregory Maxwell <greg@xiph.org>2013-06-30 07:25:55 +0400
committerGregory Maxwell <greg@xiph.org>2013-06-30 07:25:55 +0400
commitb271dae70cca6b6434f717e4a24c97b0d3735084 (patch)
tree95ed1b474c499577c007ac56ca6167f25ae45c04 /src/opus_decoder.c
parentdd7b0dac3ba85cda7e314eaa867b4f0d716c9ac4 (diff)
Brace a number of if statements instead of one-lining them.
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;