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:
Sebastian Dröge 2019-03-22 10:28:16 +02:00
parent 2a45590051
commit 2ad6b0b432

View file

@ -3919,7 +3919,6 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream,
for (i = 0, drop_messages = 0; i < n_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) {
guint body_size;
@ -3958,7 +3957,6 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream,
bytes_written = 0;
}
}
}
while (drop_messages > 0) {
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 */
for (i = 0, k = 0, drop_messages = 0; i < n_messages; i++) {
if (bytes_written >= 0) {
if (bytes_written >= messages[i].data_size) {
guint body_size;
@ -4389,7 +4386,6 @@ gst_rtsp_watch_write_serialized_messages (GstRTSPWatch * watch,
bytes_written = 0;
}
}
}
g_assert (n_messages > drop_messages);