int maxband, keyframe;
int last[2];
- /* get output buffer */
- frame->nb_samples = MPC_FRAME_SIZE;
- if ((res = ff_get_buffer(avctx, frame, 0)) < 0)
- return res;
-
keyframe = c->cur_frame == 0;
if(keyframe){
if(maxband > 32) maxband -= 33;
}
+ if (get_bits_left(gb) < 0) {
+ *got_frame_ptr = 0;
+ return buf_size;
+ }
+
if(maxband > c->maxbands + 1) {
av_log(avctx, AV_LOG_ERROR, "maxband %d too large\n",maxband);
return AVERROR_INVALIDDATA;
}
}
+ frame->nb_samples = MPC_FRAME_SIZE;
+ if ((res = ff_get_buffer(avctx, frame, 0)) < 0)
+ return res;
+
ff_mpc_dequantize_and_synth(c, maxband - 1,
(int16_t **)frame->extended_data,
avctx->channels);