Commit 7d4be3b7 authored by Andy Wingo Wingo's avatar Andy Wingo Wingo
Browse files

ext/gnomevfs/gstgnomevfssrc.c (gst_gnomevfssrc_received_headers_callback)

Original commit message from CVS:
2005-07-04  Andy Wingo  <wingo@pobox.com>

* ext/gnomevfs/gstgnomevfssrc.c
(gst_gnomevfssrc_received_headers_callback)
(audiocast_thread_kill, audiocast_thread_run): FORTIFY fixen,
hopefully.
parent d1f752ff
2005-07-04 Andy Wingo <wingo@pobox.com>
 
* ext/gnomevfs/gstgnomevfssrc.c
(gst_gnomevfssrc_received_headers_callback)
(audiocast_thread_kill, audiocast_thread_run): FORTIFY fixen,
hopefully.
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_fixate):
No refcount leakage.
 
......
......@@ -634,7 +634,8 @@ audiocast_thread_run (GstGnomeVFSSrc * src)
char buf[1];
GST_DEBUG ("audiocast thread: got die character");
read (src->audiocast_thread_die_infd, buf, 1);
if (read (src->audiocast_thread_die_infd, buf, 1) != 1)
g_warning ("gnomevfssrc: could not read from audiocast fd");
close (src->audiocast_thread_die_infd);
close (src->audiocast_fd);
return NULL;
......@@ -732,7 +733,8 @@ audiocast_thread_kill (GstGnomeVFSSrc * src)
audiocast metadata too.
*/
GST_DEBUG ("audiocast: writing die character");
write (src->audiocast_thread_die_outfd, "q", 1);
if (write (src->audiocast_thread_die_outfd, "q", 1) != 1)
g_critical ("gnomevfssrc: could not write to audiocast thread fd");
close (src->audiocast_thread_die_outfd);
GST_DEBUG ("audiocast: joining thread");
g_thread_join (src->audiocast_thread);
......@@ -785,13 +787,14 @@ gst_gnomevfssrc_received_headers_callback (gconstpointer in,
continue;
/* Icecast stuff */
if (!strncmp (data, "icy-metaint:", 12)) { /* ugh */
sscanf (data + 12, "%d", &icy_metaint);
src->icy_metaint = icy_metaint;
GST_DEBUG ("got icy-metaint %d, killing audiocast thread",
src->icy_metaint);
audiocast_thread_kill (src);
continue;
if (strncmp (data, "icy-metaint:", 12) == 0) { /* ugh */
if (sscanf (data + 12, "%d", &icy_metaint) == 1) {
src->icy_metaint = icy_metaint;
GST_DEBUG ("got icy-metaint %d, killing audiocast thread",
src->icy_metaint);
audiocast_thread_kill (src);
continue;
}
}
if (!strncmp (data, "icy-", 4))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment