mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
looping read for caps and headers
Original commit message from CVS: looping read for caps and headers
This commit is contained in:
parent
6cb4ae72f9
commit
5a05f869b4
1 changed files with 3 additions and 3 deletions
|
@ -147,7 +147,7 @@ gst_tcp_gdp_read_header (GstElement * this, int socket)
|
|||
|
||||
GST_DEBUG_OBJECT (this, "Reading %d bytes for buffer packet header",
|
||||
readsize);
|
||||
ret = read (socket, header, readsize);
|
||||
ret = gst_tcp_socket_read (socket, header, readsize);
|
||||
/* if we read 0 bytes, and we're blocking, we hit eos */
|
||||
if (ret == 0) {
|
||||
GST_DEBUG ("blocking read returns 0, EOS");
|
||||
|
@ -197,7 +197,7 @@ gst_tcp_gdp_read_caps (GstElement * this, int socket)
|
|||
readsize = header_length;
|
||||
|
||||
GST_LOG_OBJECT (this, "Reading %d bytes for caps packet header", readsize);
|
||||
ret = read (socket, header, readsize);
|
||||
ret = gst_tcp_socket_read (socket, header, readsize);
|
||||
if (ret < 0) {
|
||||
g_free (header);
|
||||
GST_ELEMENT_ERROR (this, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
|
||||
|
@ -215,7 +215,7 @@ gst_tcp_gdp_read_caps (GstElement * this, int socket)
|
|||
readsize = gst_dp_header_payload_length (header);
|
||||
payload = g_malloc (readsize);
|
||||
GST_LOG_OBJECT (this, "Reading %d bytes for caps packet payload", readsize);
|
||||
ret = read (socket, payload, readsize);
|
||||
ret = gst_tcp_socket_read (socket, payload, readsize);
|
||||
|
||||
if (ret < 0) {
|
||||
GST_ELEMENT_ERROR (this, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
|
||||
|
|
Loading…
Reference in a new issue