diff options
| author | Hunter Kvalevog <hunter@kvog.sh> | 2026-10-03 16:47:36 -0700 |
|---|---|---|
| committer | Hunter Kvalevog <hunter@kvog.sh> | 2026-10-03 16:47:36 -0700 |
| commit | 7b7d13a6c2dda921b4d7f6d896a5ff95f613a706 (patch) | |
| tree | 0f78b81aeccad6cd4f99e47a7da3f92101f1759f /flacdec/flacdec.c | |
| parent | 97ababa7dd08e8e77997f59e3d97f2559a3ec027 (diff) | |
| download | demos-7b7d13a6c2dda921b4d7f6d896a5ff95f613a706.tar.gz demos-7b7d13a6c2dda921b4d7f6d896a5ff95f613a706.zip | |
Diffstat (limited to 'flacdec/flacdec.c')
| -rw-r--r-- | flacdec/flacdec.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/flacdec/flacdec.c b/flacdec/flacdec.c index 8d927a5..e148c23 100644 --- a/flacdec/flacdec.c +++ b/flacdec/flacdec.c @@ -18,8 +18,17 @@ // WITH REGARD TO THIS SOFTWARE. // ================================================================================================ +#ifdef _MSC_VER +# pragma warning(disable: 4244) +# pragma warning(disable: 4267) +# define _CRT_SECURE_NO_WARNINGS +# define popen(A, B) _popen(A, "wb") +# define pclose _pclose +#endif + #include <assert.h> #include <stdbool.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -103,7 +112,7 @@ void read_coded_residuals(BitR *br, uint32_t block_size, uint8_t order, int32_t // (9.2.7) uint8_t rice_bits = read_bits(br, 2) ? 5 : 4; uint8_t rice_order = read_bits(br, 4); - size_t rice_partitions = 1 << rice_order; + size_t rice_partitions = (size_t)1 << rice_order; assert(block_size % rice_partitions == 0); for (size_t i = 0; i < rice_partitions; ++i) { |
