ext/gnomevfs/gstgnomevfssrc.*: Don't set icy-caps unless we have a sane interval value. Move interval to a local vari...

Original commit message from CVS:
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_init),
(gst_gnome_vfs_src_received_headers_callback):
* ext/gnomevfs/gstgnomevfssrc.h:
Don't set icy-caps unless we have a sane interval value. Move
interval to a local variable; we never use it outside this function.
This commit is contained in:
Michael Smith 2006-05-11 10:33:46 +00:00
parent 1f6e29bcb0
commit 3467a9e403
3 changed files with 12 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2006-05-11 Michael Smith <msmith@fluendo.com>
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_init),
(gst_gnome_vfs_src_received_headers_callback):
* ext/gnomevfs/gstgnomevfssrc.h:
Don't set icy-caps unless we have a sane interval value. Move
interval to a local variable; we never use it outside this function.
2006-05-11 Wim Taymans <wim@fluendo.com>
* sys/ximage/ximagesink.c: (gst_ximagesink_get_type):

View file

@ -263,7 +263,6 @@ gst_gnome_vfs_src_init (GstGnomeVFSSrc * gnomevfssrc)
gnomevfssrc->curoffset = 0;
gnomevfssrc->seekable = FALSE;
gnomevfssrc->icy_metaint = 0;
gnomevfssrc->icy_caps = NULL;
gnomevfssrc->iradio_mode = FALSE;
gnomevfssrc->http_callbacks_pushed = FALSE;
@ -550,11 +549,11 @@ gst_gnome_vfs_src_received_headers_callback (gconstpointer in,
/* Icecast stuff */
if (strncmp (data, "icy-metaint:", 12) == 0) { /* ugh */
if (sscanf (data + 12, "%d", &icy_metaint) == 1) {
src->icy_metaint = icy_metaint;
src->icy_caps = gst_caps_new_simple ("application/x-icy",
"metadata-interval", G_TYPE_INT, src->icy_metaint, NULL);
continue;
if (icy_metaint > 0)
src->icy_caps = gst_caps_new_simple ("application/x-icy",
"metadata-interval", G_TYPE_INT, icy_metaint, NULL);
}
continue;
}
if (!strncmp (data, "icy-", 4))

View file

@ -68,7 +68,6 @@ struct _GstGnomeVFSSrc
gboolean iradio_mode;
gboolean http_callbacks_pushed;
gint icy_metaint;
GstCaps *icy_caps;
gchar *iradio_name;