mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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.
This commit is contained in:
parent
d1f752ff75
commit
7d4be3b71a
2 changed files with 17 additions and 9 deletions
|
@ -1,5 +1,10 @@
|
|||
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))
|
||||
|
|
Loading…
Reference in a new issue