Unified · Split
| @@ -170,9 +170,10 @@ static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx, · 169 unmodified lines | ||
| 170 | 170 | int channels = tctx->avctx->channels; |
| 171 | 171 | int sub; |
| 172 | 172 | GetBitContext gb; |
| 173 | − int i, j, k; | |
| 173 | + int i, j, k, ret; | |
| 174 | 174 | |
| 175 | − init_get_bits(&gb, buf, buf_size * 8); | |
| 175 | + if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0) | |
| 176 | + return ret; | |
| 176 | 177 | |
| 177 | 178 | for (tctx->cur_frame = 0; tctx->cur_frame < tctx->frames_per_packet; |
| 178 | 179 | tctx->cur_frame++) { |