From: Andy W. <ap...@eo...> - 2001-07-09 02:35:59
|
I haven't fully tested this, but it appears to work properly. This diff is on gsthttpsrc.c. 160,161c160,163 < gint status; < --- > gint status, i, n_headers; > gchar **header_names; > const gchar *header_value; > 178a181,193 > > if ((ghttp_get_header_names(httpsrc->request, &header_names, &n_headers)) == 0) { > for (i=0; i<n_headers; i++) { > if (strcmp(header_names[i], "Content-type") == 0) { > header_value = ghttp_get_header(httpsrc->request, header_names[i]); > if (strcmp(header_value,"application/octet-stream") != 0) { > gst_caps_set_mime(GST_PAD_CAPS(httpsrc->srcpad), header_value); > } > } > free (header_names[i]); > } > free (header_names); > } 196a212,214 > GST_CAPS_LOCK(GST_PAD_CAPS(src->srcpad)); > GST_PAD_CAPS(src->srcpad)->id = 0; > GST_CAPS_UNLOCK(GST_PAD_CAPS(src->srcpad)); |