Skip to content

Commit 6532be4

Browse files
norihiroRytoEX
authored andcommitted
obs-outputs: Remove unused functions on non-Windows
Also adjusted mixed usage of `#if defined` and `#ifdef`.
1 parent d2971d1 commit 6532be4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

plugins/obs-outputs/rtmp-stream.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ static void droptest_cap_data_rate(struct rtmp_stream *stream, size_t size)
350350
}
351351
#endif
352352

353+
#ifdef _WIN32
353354
static int socket_queue_data(RTMPSockBuf *sb, const char *data, int len,
354355
void *arg)
355356
{
@@ -384,6 +385,7 @@ static int socket_queue_data(RTMPSockBuf *sb, const char *data, int len,
384385

385386
return len;
386387
}
388+
#endif // _WIN32
387389

388390
static int handle_socket_read(struct rtmp_stream *stream)
389391
{
@@ -639,7 +641,6 @@ static void dbr_set_bitrate(struct rtmp_stream *stream);
639641

640642
#ifdef _WIN32
641643
#define socklen_t int
642-
#endif
643644

644645
static void log_sndbuf_size(struct rtmp_stream *stream)
645646
{
@@ -651,14 +652,15 @@ static void log_sndbuf_size(struct rtmp_stream *stream)
651652
info("Socket send buffer is %d bytes", cur_sendbuf_size);
652653
}
653654
}
655+
#endif
654656

655657
static void *send_thread(void *data)
656658
{
657659
struct rtmp_stream *stream = data;
658660

659661
os_set_thread_name("rtmp-stream: send_thread");
660662

661-
#if defined(_WIN32)
663+
#ifdef _WIN32
662664
log_sndbuf_size(stream);
663665
#endif
664666

@@ -733,7 +735,7 @@ static void *send_thread(void *data)
733735
send_footers(stream); // Y2023 spec
734736
}
735737

736-
#if defined(_WIN32)
738+
#ifdef _WIN32
737739
log_sndbuf_size(stream);
738740
#endif
739741

0 commit comments

Comments
 (0)