Message ID | 20180102223457.10813-1-michael@niedermayer.cc |
---|---|
State | New |
Headers | show |
On 1/2/2018 10:34 PM, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/opus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Looks reasonable. - Derek
On 2 January 2018 at 22:34, Michael Niedermayer <michael@niedermayer.cc> wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/opus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/opus.c b/libavcodec/opus.c > index 9cbf4aed92..d00a17a7f1 100644 > --- a/libavcodec/opus.c > +++ b/libavcodec/opus.c > @@ -566,12 +566,12 @@ void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder > *rc, int encode) > int bits2[CELT_MAX_BANDS]; > > /* Spread */ > - if (opus_rc_tell(rc) + 4 <= f->framebits) > + if (opus_rc_tell(rc) + 4 <= f->framebits) { > if (encode) > ff_opus_rc_enc_cdf(rc, f->spread, ff_celt_model_spread); > else > f->spread = ff_opus_rc_dec_cdf(rc, ff_celt_model_spread); > - else > + } else > f->spread = CELT_SPREAD_NORMAL; > > /* Initialize static allocation caps */ > -- > 2.15.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > Add brackets after the } else and it'll look good to me.
On Wed, Jan 03, 2018 at 01:34:59AM +0000, Rostislav Pehlivanov wrote: > On 2 January 2018 at 22:34, Michael Niedermayer <michael@niedermayer.cc> > wrote: > > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavcodec/opus.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/libavcodec/opus.c b/libavcodec/opus.c > > index 9cbf4aed92..d00a17a7f1 100644 > > --- a/libavcodec/opus.c > > +++ b/libavcodec/opus.c > > @@ -566,12 +566,12 @@ void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder > > *rc, int encode) > > int bits2[CELT_MAX_BANDS]; > > > > /* Spread */ > > - if (opus_rc_tell(rc) + 4 <= f->framebits) > > + if (opus_rc_tell(rc) + 4 <= f->framebits) { > > if (encode) > > ff_opus_rc_enc_cdf(rc, f->spread, ff_celt_model_spread); > > else > > f->spread = ff_opus_rc_dec_cdf(rc, ff_celt_model_spread); > > - else > > + } else > > f->spread = CELT_SPREAD_NORMAL; > > > > /* Initialize static allocation caps */ > > -- > > 2.15.1 > > > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > Add brackets after the } else and it'll look good to me. will apply with that change thx [...]
diff --git a/libavcodec/opus.c b/libavcodec/opus.c index 9cbf4aed92..d00a17a7f1 100644 --- a/libavcodec/opus.c +++ b/libavcodec/opus.c @@ -566,12 +566,12 @@ void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode) int bits2[CELT_MAX_BANDS]; /* Spread */ - if (opus_rc_tell(rc) + 4 <= f->framebits) + if (opus_rc_tell(rc) + 4 <= f->framebits) { if (encode) ff_opus_rc_enc_cdf(rc, f->spread, ff_celt_model_spread); else f->spread = ff_opus_rc_dec_cdf(rc, ff_celt_model_spread); - else + } else f->spread = CELT_SPREAD_NORMAL; /* Initialize static allocation caps */
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/opus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)