From a13c92c0fc8de4c2c8ff0e598eea419a4e1cffa9 Mon Sep 17 00:00:00 2001 From: winshining Date: Sat, 8 Jul 2023 12:17:39 +0800 Subject: [PATCH] [fix] fixed an endian bug in mp4 vod. --- ngx_rtmp_mp4_module.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ngx_rtmp_mp4_module.c b/ngx_rtmp_mp4_module.c index b374cfa..03aca03 100644 --- a/ngx_rtmp_mp4_module.c +++ b/ngx_rtmp_mp4_module.c @@ -202,8 +202,13 @@ typedef struct { } ngx_rtmp_mp4_ctx_t; +#if (NGX_HAVE_LITTLE_ENDIAN) #define ngx_rtmp_mp4_make_tag(a, b, c, d) \ ((uint32_t)d << 24 | (uint32_t)c << 16 | (uint32_t)b << 8 | (uint32_t)a) +#else +#define ngx_rtmp_mp4_make_tag(a, b, c, d) \ + ((uint32_t)a << 24 | (uint32_t)b << 16 | (uint32_t)c << 8 | (uint32_t)d) +#endif static ngx_inline uint32_t