diff --git a/ngx_rtmp_mp4_module.c b/ngx_rtmp_mp4_module.c index 393468a..0044c64 100644 --- a/ngx_rtmp_mp4_module.c +++ b/ngx_rtmp_mp4_module.c @@ -26,6 +26,14 @@ static ngx_int_t ngx_rtmp_mp4_reset(ngx_rtmp_session_t *s); #pragma pack(push,4) +/* disable zero-sized array warning by msvc */ + +#if (NGX_WIN32) +#pragma warning(push) +#pragma warning(disable:4200) +#endif + + typedef struct { uint32_t first_chunk; uint32_t samples_per_chunk; @@ -102,6 +110,12 @@ typedef struct { uint64_t entries[0]; } ngx_rtmp_mp4_offsets64_t; + +#if (NGX_WIN32) +#pragma warning(pop) +#endif + + #pragma pack(pop)