summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrotord/libavwrapper.cpp6
-rwxr-xr-xrotord/libavwrapper.h2
-rwxr-xr-xrotord/rotor.cpp1
-rwxr-xr-xrotord/rotord.cpp3
-rw-r--r--rotord/vampHost.cpp1
5 files changed, 9 insertions, 4 deletions
diff --git a/rotord/libavwrapper.cpp b/rotord/libavwrapper.cpp
index 43c20f4..f7b573f 100755
--- a/rotord/libavwrapper.cpp
+++ b/rotord/libavwrapper.cpp
@@ -1475,18 +1475,18 @@ bool libav::audioloader::setup(const std::string &filename){
mutex.lock();
if (codecContext->codec == NULL)
{
-
+
av_free(frame);
avformat_close_input(&formatContext);
+ mutex.unlock();
std::cout << "Couldn't find a proper decoder" << std::endl;
return false;
}
else if (avcodec_open2(codecContext, codecContext->codec, NULL) != 0)
{
-
av_free(frame);
avformat_close_input(&formatContext);
- mutex.lock();
+ mutex.unlock();
std::cout << "Couldn't open the context with the decoder" << std::endl;
return false;
}
diff --git a/rotord/libavwrapper.h b/rotord/libavwrapper.h
index a663289..656f885 100755
--- a/rotord/libavwrapper.h
+++ b/rotord/libavwrapper.h
@@ -1,4 +1,4 @@
- #ifndef libavwrapper_H
+#ifndef libavwrapper_H
#define libavwrapper_H
/*
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 884c565..dd98ac3 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -163,6 +163,7 @@ bool Audio_analysis::init(int _channels,int _bits,int _samples, int _rate) {
return analyser.init(soname,id,_channels,_bits,_samples,_rate,outputNo,params);
+
//attempt to load vamp plugin and prepare to receive frames of data
//should the audio analysis contain a vamphost or should it inherit?
//maybe neater to contain it in terms of headers etc
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp
index 5283798..00872de 100755
--- a/rotord/rotord.cpp
+++ b/rotord/rotord.cpp
@@ -192,7 +192,10 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS
sc.push_back(body);
//Rotor::Command_response response=((Poco::AutoPtr<Rotor::Render_context>)task)->session_command(sc);
+ cerr<<"calling render context refcount: "<<((Poco::AutoPtr<Rotor::Render_context>)task)->referenceCount()<<endl;
((Poco::AutoPtr<Rotor::Render_context>)task)->session_command(sc,XML,status);
+ //this deadlocks after a render, why?
+
//content=response.description;
//status=response.status;
diff --git a/rotord/vampHost.cpp b/rotord/vampHost.cpp
index 3d50c7c..65755eb 100644
--- a/rotord/vampHost.cpp
+++ b/rotord/vampHost.cpp
@@ -604,6 +604,7 @@ bool vampHost::Analyser::init(const string &soname,const string &id,const int &_
stride=channels*bytes;
scale=(1.0f/pow(2.0f,bits));
+ features.clear(); //in case of reuse
features[0.0f]=0;
loader = PluginLoader::getInstance();