Skip to content

Commit 1894d33

Browse files
committed
fixed type signs
1 parent 368466b commit 1894d33

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hls/ngx_rtmp_hls_module.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ typedef struct {
4040
ngx_uint_t audio_cc;
4141
ngx_uint_t video_cc;
4242

43-
int64_t aframe_base;
44-
int64_t aframe_num;
43+
uint64_t aframe_base;
44+
uint64_t aframe_num;
4545

4646
uint64_t offset;
4747
} ngx_rtmp_hls_ctx_t;
@@ -785,7 +785,8 @@ ngx_rtmp_hls_audio(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
785785
ngx_rtmp_hls_app_conf_t *hacf;
786786
ngx_rtmp_hls_ctx_t *ctx;
787787
ngx_rtmp_codec_ctx_t *codec_ctx;
788-
int64_t dts, ddts;
788+
uint64_t dts;
789+
int64_t ddts;
789790
ngx_rtmp_mpegts_frame_t frame;
790791
ngx_buf_t out;
791792
u_char *p;
@@ -854,7 +855,7 @@ ngx_rtmp_hls_audio(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
854855

855856
dts = ctx->aframe_base + ctx->aframe_num * 90000 * 1024 /
856857
codec_ctx->sample_rate;
857-
ddts = dts - frame.dts;
858+
ddts = (int64_t) (dts - frame.dts);
858859

859860
ngx_log_debug2(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
860861
"hls: sync stat ddts=%L (%.5fs)",

0 commit comments

Comments
 (0)