mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 12:15:19 +00:00
rtspconnection: Remove unneeded bytes_written >= 0 conditions
It's unsigned and always >= 0. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/569
This commit is contained in:
parent
2a45590051
commit
2ad6b0b432
1 changed files with 57 additions and 61 deletions
|
@ -3919,7 +3919,6 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream,
|
||||||
for (i = 0, drop_messages = 0; i < n_messages; i++) {
|
for (i = 0, drop_messages = 0; i < n_messages; i++) {
|
||||||
msg = gst_queue_array_peek_nth_struct (watch->messages, i);
|
msg = gst_queue_array_peek_nth_struct (watch->messages, i);
|
||||||
|
|
||||||
if (bytes_written >= 0) {
|
|
||||||
if (bytes_written >= msg->data_size - msg->data_offset) {
|
if (bytes_written >= msg->data_size - msg->data_offset) {
|
||||||
guint body_size;
|
guint body_size;
|
||||||
|
|
||||||
|
@ -3958,7 +3957,6 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream,
|
||||||
bytes_written = 0;
|
bytes_written = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
while (drop_messages > 0) {
|
while (drop_messages > 0) {
|
||||||
msg = gst_queue_array_pop_head_struct (watch->messages);
|
msg = gst_queue_array_pop_head_struct (watch->messages);
|
||||||
|
@ -4354,7 +4352,6 @@ gst_rtsp_watch_write_serialized_messages (GstRTSPWatch * watch,
|
||||||
|
|
||||||
/* not done, let's skip all messages that were sent already and free them */
|
/* not done, let's skip all messages that were sent already and free them */
|
||||||
for (i = 0, k = 0, drop_messages = 0; i < n_messages; i++) {
|
for (i = 0, k = 0, drop_messages = 0; i < n_messages; i++) {
|
||||||
if (bytes_written >= 0) {
|
|
||||||
if (bytes_written >= messages[i].data_size) {
|
if (bytes_written >= messages[i].data_size) {
|
||||||
guint body_size;
|
guint body_size;
|
||||||
|
|
||||||
|
@ -4389,7 +4386,6 @@ gst_rtsp_watch_write_serialized_messages (GstRTSPWatch * watch,
|
||||||
bytes_written = 0;
|
bytes_written = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_assert (n_messages > drop_messages);
|
g_assert (n_messages > drop_messages);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue