summaryrefslogtreecommitdiff
path: root/plugins/mms/mmsplug.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2013-07-06 16:46:43 +0200
committerGravatar waker <wakeroid@gmail.com>2013-07-06 16:46:43 +0200
commit362c82591f489696d804bad3cab37e5a3184d4da (patch)
tree031d39700ab545d0fc90af03e8bb612fffa7ef50 /plugins/mms/mmsplug.c
parentfc455eb3842de79f638a3982eb30e1728ac1f736 (diff)
mms radio now works using the new wma plugin
Diffstat (limited to 'plugins/mms/mmsplug.c')
-rw-r--r--plugins/mms/mmsplug.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/mms/mmsplug.c b/plugins/mms/mmsplug.c
index cb339a96..9dc495b0 100644
--- a/plugins/mms/mmsplug.c
+++ b/plugins/mms/mmsplug.c
@@ -30,6 +30,7 @@ typedef struct {
mmsx_t *stream;
const mms_io_t *io;
int need_abort;
+ int64_t pos;
} MMS_FILE;
static DB_vfs_t plugin;
@@ -92,6 +93,7 @@ mms_read (void *ptr, size_t size, size_t nmemb, DB_FILE *stream) {
}
MMS_FILE *fp = (MMS_FILE *)stream;
int res = mmsx_read ((mms_io_t *)fp->io, fp->stream, ptr, size * nmemb);
+ fp->pos += res;
if (fp->need_abort) {
return -1;
}
@@ -100,6 +102,7 @@ mms_read (void *ptr, size_t size, size_t nmemb, DB_FILE *stream) {
static int
mms_seek (DB_FILE *stream, int64_t offset, int whence) {
+ assert (0);
assert (stream);
int connect_err = mms_ensure_connected ((MMS_FILE *)stream);
if (connect_err < 0) {
@@ -112,11 +115,12 @@ mms_seek (DB_FILE *stream, int64_t offset, int whence) {
static int64_t
mms_tell (DB_FILE *stream) {
assert (stream);
- int connect_err = mms_ensure_connected ((MMS_FILE *)stream);
- if (connect_err < 0) {
- return connect_err;
- }
- return mmsx_get_current_pos (((MMS_FILE *)stream)->stream);
+ return ((MMS_FILE *)stream)->pos;
+// int connect_err = mms_ensure_connected ((MMS_FILE *)stream);
+// if (connect_err < 0) {
+// return connect_err;
+// }
+// return mmsx_get_current_pos (((MMS_FILE *)stream)->stream);
}
static void