From: Ognyan Tonchev Date: Mon, 30 Jan 2012 14:55:26 +0000 (+0100) Subject: rtspconnection: only send new data immediately if there are no queued messages X-Git-Tag: 1.19.3~511^2~6555^2~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6e07b65a4dd63f1168a06aa31b45020a43226f4;p=platform%2Fupstream%2Fgstreamer.git rtspconnection: only send new data immediately if there are no queued messages Even if watch->messages->length is 0 there may still be some data from a message that was only written partially at the previous attempt stored in watch->write_data, so check for that as well. We don't want to write data into the middle of another message, which could happen when there wasn't enough bandwidth. https://bugzilla.gnome.org/show_bug.cgi?id=669039 --- diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index c7b0f32..731add3 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -3490,7 +3490,7 @@ gst_rtsp_watch_write_data (GstRTSPWatch * watch, const guint8 * data, g_mutex_lock (watch->mutex); /* try to send the message synchronously first */ - if (watch->messages->length == 0) { + if (watch->messages->length == 0 && watch->write_data == NULL) { res = write_bytes (watch->writefd.fd, data, &off, size); if (res != GST_RTSP_EINTR) { if (id != NULL)