mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
multiudpsink: check the right size when warning about too large udp packets
What matters is the total size, not the size of any of the individual memory chunks that make up the packet.
This commit is contained in:
parent
ab77c424be
commit
80245e2a70
1 changed files with 5 additions and 5 deletions
|
@ -468,11 +468,6 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
mem = gst_buffer_get_memory (buffer, i);
|
||||
gst_memory_map (mem, &map[i], GST_MAP_READ);
|
||||
|
||||
if (map[i].size > UDP_MAX_SIZE) {
|
||||
GST_WARNING ("Attempting to send a UDP packet larger than maximum "
|
||||
"size (%" G_GSIZE_FORMAT " > %d)", map[i].size, UDP_MAX_SIZE);
|
||||
}
|
||||
|
||||
vec[i].buffer = map[i].data;
|
||||
vec[i].size = map[i].size;
|
||||
|
||||
|
@ -486,6 +481,11 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
g_mutex_lock (&sink->client_lock);
|
||||
GST_LOG_OBJECT (bsink, "about to send %" G_GSIZE_FORMAT " bytes", size);
|
||||
|
||||
if (size > UDP_MAX_SIZE) {
|
||||
GST_WARNING_OBJECT (bsink, "Attempting to send a UDP packet larger than "
|
||||
"maximum size (%" G_GSIZE_FORMAT " > %d)", size, UDP_MAX_SIZE);
|
||||
}
|
||||
|
||||
no_clients = 0;
|
||||
num = 0;
|
||||
for (clients = sink->clients; clients; clients = g_list_next (clients)) {
|
||||
|
|
Loading…
Reference in a new issue