summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/udp_pes_scheduler.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index 553b859d..9119cc67 100644
--- a/tools/udp_pes_scheduler.c
+++ b/tools/udp_pes_scheduler.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: udp_pes_scheduler.c,v 1.47 2009-08-05 11:50:25 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.48 2009-08-05 11:56:57 phintuka Exp $
*
*/
@@ -874,7 +874,7 @@ void cUdpScheduler::ReSend(int fd, uint64_t Pos, int Seq1, int Seq2)
struct {
stream_udp_header_t hdr;
- char mem[64-sizeof(stream_udp_header_t)];
+ char payload[64-sizeof(stream_udp_header_t)];
} udp_ctrl = {{(uint64_t)INT64_C(-1), (uint16_t)-1}, {0}};
// Handle buffer wrap
@@ -887,9 +887,9 @@ void cUdpScheduler::ReSend(int fd, uint64_t Pos, int Seq1, int Seq2)
LOGDBG("cUdpScheduler::ReSend: requested range too large (%d-%d)",
Seq1, Seq2);
- sprintf((char*)udp_ctrl.hdr.payload,
- "UDP MISSING %d-%d %" PRIu64,
- Seq1, (Seq2 & UDP_BUFFER_MASK), Pos);
+ snprintf(udp_ctrl.payload, sizeof(udp_ctrl.payload),
+ "UDP MISSING %d-%d %" PRIu64,
+ Seq1, (Seq2 & UDP_BUFFER_MASK), Pos);
send(fd, &udp_ctrl, sizeof(udp_ctrl), 0);
return;
}
@@ -938,9 +938,9 @@ void cUdpScheduler::ReSend(int fd, uint64_t Pos, int Seq1, int Seq2)
break;
}
- sprintf((char*)udp_ctrl.hdr.payload,
- "UDP MISSING %d-%d %" PRIu64,
- Seq0, (Seq1 & UDP_BUFFER_MASK), Pos);
+ snprintf(udp_ctrl.payload, sizeof(udp_ctrl.payload),
+ "UDP MISSING %d-%d %" PRIu64,
+ Seq0, (Seq1 & UDP_BUFFER_MASK), Pos);
send(fd, &udp_ctrl, sizeof(udp_ctrl), 0);
}