summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/player.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c
index fc7fa46..06f3ec3 100644
--- a/src/player.c
+++ b/src/player.c
@@ -465,6 +465,12 @@ void *BarPlayerThread (void *data) {
do {
/* if curl failed, setup new headers _everytime_ (the range changed) */
if (curlRet == CURLE_PARTIAL_FILE) {
+ /* don't calc song length from content-length header again (wrong
+ * time would be shown otherwise as the reported content-length is
+ * smaller than the whole file actually is -- we're going to
+ * receive partial content!) */
+ curl_easy_setopt (player->audioFd, CURLOPT_HEADERFUNCTION, NULL);
+ curl_easy_setopt (player->audioFd, CURLOPT_WRITEHEADER, NULL);
curl_easy_setopt (player->audioFd, CURLOPT_RESUME_FROM,
player->bytesReceived);
}