Skip to content

Commit a13c92c

Browse files
committed
[fix] fixed an endian bug in mp4 vod.
1 parent 16bc4b0 commit a13c92c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ngx_rtmp_mp4_module.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,13 @@ typedef struct {
202202
} ngx_rtmp_mp4_ctx_t;
203203

204204

205+
#if (NGX_HAVE_LITTLE_ENDIAN)
205206
#define ngx_rtmp_mp4_make_tag(a, b, c, d) \
206207
((uint32_t)d << 24 | (uint32_t)c << 16 | (uint32_t)b << 8 | (uint32_t)a)
208+
#else
209+
#define ngx_rtmp_mp4_make_tag(a, b, c, d) \
210+
((uint32_t)a << 24 | (uint32_t)b << 16 | (uint32_t)c << 8 | (uint32_t)d)
211+
#endif
207212

208213

209214
static ngx_inline uint32_t

0 commit comments

Comments
 (0)