- if(!s->samples_left){
- if(!got_terms){
- av_log(avctx, AV_LOG_ERROR, "No block with decorrelation terms\n");
- return -1;
- }
- if(!got_weights){
- av_log(avctx, AV_LOG_ERROR, "No block with decorrelation weights\n");
- return -1;
- }
- if(!got_samples){
- av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n");
- return -1;
- }
- if(!got_entropy){
- av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n");
- return -1;
- }
- if(s->hybrid && !got_hybrid){
- av_log(avctx, AV_LOG_ERROR, "Hybrid config not found\n");
- return -1;
- }
- if(!got_bs){
- av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n");
- return -1;
- }
- if(!got_float && avctx->sample_fmt == AV_SAMPLE_FMT_FLT){
- av_log(avctx, AV_LOG_ERROR, "Float information not found\n");
- return -1;
- }
- if(s->got_extra_bits && avctx->sample_fmt != AV_SAMPLE_FMT_FLT){
- const int size = get_bits_left(&s->gb_extra_bits);
- const int wanted = s->samples * s->extra_bits << s->stereo_in;
- if(size < wanted){
- av_log(avctx, AV_LOG_ERROR, "Too small EXTRABITS\n");
- s->got_extra_bits = 0;
- }
- }
- s->samples_left = s->samples;
- }else{
- init_get_bits(&s->gb, orig_buf + s->sc.offset, s->sc.size);
- skip_bits_long(&s->gb, s->sc.bits_used);
- if(s->got_extra_bits){
- init_get_bits(&s->gb_extra_bits, orig_buf + s->extra_sc.offset,
- s->extra_sc.size);
- skip_bits_long(&s->gb_extra_bits, s->extra_sc.bits_used);
+
+ if (!got_terms) {
+ av_log(avctx, AV_LOG_ERROR, "No block with decorrelation terms\n");
+ return -1;
+ }
+ if (!got_weights) {
+ av_log(avctx, AV_LOG_ERROR, "No block with decorrelation weights\n");
+ return -1;
+ }
+ if (!got_samples) {
+ av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n");
+ return -1;
+ }
+ if (!got_entropy) {
+ av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n");
+ return -1;
+ }
+ if (s->hybrid && !got_hybrid) {
+ av_log(avctx, AV_LOG_ERROR, "Hybrid config not found\n");
+ return -1;
+ }
+ if (!got_bs) {
+ av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n");
+ return -1;
+ }
+ if (!got_float && avctx->sample_fmt == AV_SAMPLE_FMT_FLT) {
+ av_log(avctx, AV_LOG_ERROR, "Float information not found\n");
+ return -1;
+ }
+ if (s->got_extra_bits && avctx->sample_fmt != AV_SAMPLE_FMT_FLT) {
+ const int size = get_bits_left(&s->gb_extra_bits);
+ const int wanted = s->samples * s->extra_bits << s->stereo_in;
+ if (size < wanted) {
+ av_log(avctx, AV_LOG_ERROR, "Too small EXTRABITS\n");
+ s->got_extra_bits = 0;