Unified · Split
| @@ -466,7 +466,8 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data, · 465 unmodified lines | ||
| 466 | 466 | } |
| 467 | 467 | } |
| 468 | 468 | /* init and position bitstream reader */ |
| 469 | − init_get_bits(&s->gb, buf, buf_size * 8); | |
| 469 | + if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0) | |
| 470 | + return ret; | |
| 470 | 471 | skip_bits(&s->gb, s->bitindex); |
| 471 | 472 | |
| 472 | 473 | /* process header or next subblock */ |