+2004-06-02 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * ext/alsa/gstalsasrc.c: (gst_alsa_src_get_time):
+ avoid a segfault
+ * gst/tcp/gsttcp.c: (gst_tcp_socket_write), (gst_tcp_socket_read),
+ (gst_tcp_gdp_read_header), (gst_tcp_gdp_read_caps):
+ * gst/tcp/gsttcpserversrc.c: (gst_tcpserversrc_gdp_read_caps),
+ (gst_tcpserversrc_gdp_read_header):
+ use ssize_t over size_t since the former is signed and thus the
+ check for error codes can work
+
2004-06-02 Wim Taymans <wim@fluendo.com>
reviewed by: Johan
{
snd_pcm_sframes_t delay;
- if (snd_pcm_delay (this->handle, &delay) == 0) {
+ if (snd_pcm_delay (this->handle, &delay) == 0 && this->format) {
return GST_SECOND * (this->transmitted + delay) / this->format->rate;
} else {
return 0;
size_t bytes_written = 0;
while (bytes_written < count) {
- size_t wrote = write (socket, buf + bytes_written,
+ ssize_t wrote = write (socket, buf + bytes_written,
count - bytes_written);
if (wrote <= 0) {
size_t bytes_read = 0;
while (bytes_read < count) {
- size_t ret = read (socket, buf + bytes_read,
+ ssize_t ret = read (socket, buf + bytes_read,
count - bytes_read);
if (ret <= 0) {
size_t header_length = GST_DP_HEADER_LENGTH;
size_t readsize;
guint8 *header = NULL;
- size_t ret;
+ ssize_t ret;
GstBuffer *buffer;
header = g_malloc (header_length);
size_t readsize;
guint8 *header = NULL;
guint8 *payload = NULL;
- size_t ret;
+ ssize_t ret;
GstCaps *caps;
gchar *string;
size_t readsize;
guint8 *header = NULL;
guint8 *payload = NULL;
- size_t ret;
+ ssize_t ret;
GstCaps *caps;
gchar *string;
size_t header_length = GST_DP_HEADER_LENGTH;
size_t readsize;
guint8 *header = NULL;
- size_t ret;
+ ssize_t ret;
GstBuffer *buffer;
header = g_malloc (header_length);