summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-21 11:37:19 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-21 11:37:19 +0100
commit08f95e176cb79eeba3f98735265f6dcf31765d49 (patch)
treeee5d23a790b70bf833bc14ec684c43ffa13fafbe /plugins
parent6a7522ed0d4b3355536432cadbda155455de0a06 (diff)
parent46742cfc009d004e71e9ef211a78e14ae23986e2 (diff)
Merge branch 'master' into guiplug
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/callbacks.c1
-rw-r--r--plugins/vfs_curl/vfs_curl.c13
2 files changed, 9 insertions, 5 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index c7b8a18f..03ca7dc7 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -902,6 +902,7 @@ seekbar_draw (GtkWidget *widget) {
clearlooks_rounded_rectangle (cr, 2, widget->allocation.height/2-4, widget->allocation.width-4, 8, 4, 0xff);
theme_set_cairo_source_rgb (cr, COLO_SEEKBAR_FRONT);
cairo_stroke (cr);
+ cairo_destroy (cr);
return;
}
float pos = 0;
diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c
index 42211fe3..034220e2 100644
--- a/plugins/vfs_curl/vfs_curl.c
+++ b/plugins/vfs_curl/vfs_curl.c
@@ -119,6 +119,12 @@ http_curl_write (void *ptr, size_t size, size_t nmemb, void *stream) {
fp->gotheader = 1;
}
}
+
+ deadbeef->mutex_lock (fp->mutex);
+ if (fp->status == STATUS_INITIAL && fp->gotheader) {
+ fp->status = STATUS_READING;
+ }
+ deadbeef->mutex_unlock (fp->mutex);
while (avail > 0) {
deadbeef->mutex_lock (fp->mutex);
if (fp->status == STATUS_SEEK) {
@@ -290,7 +296,7 @@ http_curl_write_abort (void *ptr, size_t size, size_t nmemb, void *stream) {
static int
http_curl_control (void *stream, double dltotal, double dlnow, double ultotal, double ulnow) {
- trace ("http_curl_control\n");
+// trace ("http_curl_control\n");
assert (stream);
HTTP_FILE *fp = (HTTP_FILE *)stream;
if (fp->status == STATUS_ABORTED) {
@@ -328,7 +334,7 @@ http_thread_func (uintptr_t ctx) {
}
#endif
#endif
- fp->status = STATUS_STARTING;
+// fp->status = STATUS_STARTING;
trace ("vfs_curl: started loading data\n");
for (;;) {
@@ -382,9 +388,6 @@ http_thread_func (uintptr_t ctx) {
#endif
curl_easy_setopt (curl, CURLOPT_PROXYTYPE, curlproxytype);
}
- deadbeef->mutex_lock (fp->mutex);
- fp->status = STATUS_READING;
- deadbeef->mutex_unlock (fp->mutex);
status = curl_easy_perform (curl);
trace ("vfs_curl: curl_easy_perform status=%d\n", status);
if (status != 0) {