diff options
Diffstat (limited to 'src/output/raop_output_plugin.c')
-rw-r--r-- | src/output/raop_output_plugin.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c index dd35ce8e9..dba89daef 100644 --- a/src/output/raop_output_plugin.c +++ b/src/output/raop_output_plugin.c @@ -378,12 +378,10 @@ get_tcp_connect_by_host(int sd, const char *host, short destport, * Calculate the current NTP time, store it in the buffer. */ static void -fill_int(unsigned char *buffer, unsigned int rtp_time) +fill_int(unsigned char *buffer, uint32_t value) { - int iter; - for (iter = 0; iter < 4; iter++) { - buffer[iter] = (rtp_time >> ((3 - iter) * 8)) & 0xff; - } + uint32_t be = GINT32_TO_BE(value); + memcpy(buffer, &be, sizeof(be)); } /* |