Skip to content

Commit

Permalink
[fix] fixed an endian bug in mp4 vod.
Browse files Browse the repository at this point in the history
  • Loading branch information
winshining committed Jul 8, 2023
1 parent 16bc4b0 commit a13c92c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ngx_rtmp_mp4_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a13c92c

Please sign in to comment.