From 7794a42843ccd60bbd56357440e56f6cb072c738 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 26 Jul 2026 20:12:58 -0500 Subject: [PATCH] Fix C4146 warning on MSVC --- h264bitstream/bs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h264bitstream/bs.h b/h264bitstream/bs.h index 9c84d9fa..ee28bbc0 100644 --- a/h264bitstream/bs.h +++ b/h264bitstream/bs.h @@ -264,7 +264,7 @@ static inline void bs_write_se(bs_t* b, int32_t v) { if (v <= 0) { - bs_write_ue(b, (-(uint32_t)v) * 2); + bs_write_ue(b, (~(uint32_t)v + 1) * 2); } else {