Skip to content

Commit dd5f2aa

Browse files
committed
fixed compilation
1 parent c390521 commit dd5f2aa

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

ngx_rtmp.c

+4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ static char * ngx_rtmp_merge_applications(ngx_conf_t *cf,
3131
ngx_uint_t ctx_index);
3232

3333

34+
#if (nginx_version >= 1007005)
35+
ngx_thread_volatile ngx_queue_t ngx_rtmp_init_queue;
36+
#else
3437
ngx_thread_volatile ngx_event_t *ngx_rtmp_init_queue;
38+
#endif
3539

3640

3741
ngx_uint_t ngx_rtmp_max_module;

ngx_rtmp.h

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <ngx_core.h>
1313
#include <ngx_event.h>
1414
#include <ngx_event_connect.h>
15+
#include <nginx.h>
1516

1617
#include "ngx_rtmp_amf.h"
1718
#include "ngx_rtmp_bandwidth.h"
@@ -198,7 +199,11 @@ typedef struct {
198199
ngx_str_t *addr_text;
199200
int connected;
200201

202+
#if (nginx_version >= 1007005)
203+
ngx_queue_t posted_dry_events;
204+
#else
201205
ngx_event_t *posted_dry_events;
206+
#endif
202207

203208
/* client buffer time in msec */
204209
uint32_t buflen;
@@ -602,7 +607,11 @@ extern ngx_rtmp_bandwidth_t ngx_rtmp_bw_in;
602607

603608

604609
extern ngx_uint_t ngx_rtmp_naccepted;
610+
#if (nginx_version >= 1007005)
611+
extern ngx_thread_volatile ngx_queue_t ngx_rtmp_init_queue;
612+
#else
605613
extern ngx_thread_volatile ngx_event_t *ngx_rtmp_init_queue;
614+
#endif
606615

607616
extern ngx_uint_t ngx_rtmp_max_module;
608617
extern ngx_module_t ngx_rtmp_core_module;

ngx_rtmp_play_module.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <ngx_config.h>
88
#include <ngx_core.h>
9+
#include <nginx.h>
910
#include "ngx_rtmp_play_module.h"
1011
#include "ngx_rtmp_cmd_module.h"
1112
#include "ngx_rtmp_netcall_module.h"
@@ -430,7 +431,12 @@ ngx_rtmp_play_do_stop(ngx_rtmp_session_t *s)
430431
ngx_del_timer(&ctx->send_evt);
431432
}
432433

433-
if (ctx->send_evt.prev) {
434+
#if (nginx_version >= 1007005)
435+
if (ctx->send_evt.posted)
436+
#else
437+
if (ctx->send_evt.prev)
438+
#endif
439+
{
434440
ngx_delete_posted_event((&ctx->send_evt));
435441
}
436442

0 commit comments

Comments
 (0)