aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputStream.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-07 05:00:56 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-07 05:00:56 +0000
commit283e34eaae554604ed1f2f848026840c0eed3dfd (patch)
tree1ca514a48ce28be1da09eee5eed95435b760b9ad /src/inputStream.c
parent74f1c8c0181ce00546455b5408a186cca02f16cb (diff)
downloadmpd-283e34eaae554604ed1f2f848026840c0eed3dfd.tar.gz
mpd-283e34eaae554604ed1f2f848026840c0eed3dfd.tar.xz
mpd-283e34eaae554604ed1f2f848026840c0eed3dfd.zip
icy metadata! wahoo
still lots some debug code with print out's, so don't bitch about it! git-svn-id: https://svn.musicpd.org/mpd/trunk@1364 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputStream.c')
-rw-r--r--src/inputStream.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/inputStream.c b/src/inputStream.c
index 6ff2d1bd5..e15788a13 100644
--- a/src/inputStream.c
+++ b/src/inputStream.c
@@ -26,6 +26,14 @@
#include <unistd.h>
int openInputStream(InputStream * inStream, char * url) {
+ inStream->offset = 0;
+ inStream->size = 0;
+ inStream->error = 0;
+ inStream->mime = NULL;
+ inStream->seekable = 0;
+ inStream->metaName = NULL;
+ inStream->metaTitle = NULL;
+
if(inputStream_fileOpen(inStream,url) == 0) return 0;
if(inputStream_httpOpen(inStream,url) == 0) return 0;
@@ -43,6 +51,10 @@ size_t readFromInputStream(InputStream * inStream, void * ptr, size_t size,
}
int closeInputStream(InputStream * inStream) {
+ if(inStream->mime) free(inStream->mime);
+ if(inStream->metaName) free(inStream->metaName);
+ if(inStream->metaTitle) free(inStream->metaTitle);
+
return inStream->closeFunc(inStream);
}
@@ -53,4 +65,3 @@ int inputStreamAtEOF(InputStream * inStream) {
int bufferInputStream(InputStream * inStream) {
return inStream->bufferFunc(inStream);
}
-/* vim:set shiftwidth=8 tabstop=8 expandtab: */