Skip to content
Snippets Groups Projects
Commit eec9ac2b authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #9832: codecs: fix logging

parent 55a41c7c
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ AudioCodecFactory::AudioCodecFactory() : ...@@ -48,7 +48,7 @@ AudioCodecFactory::AudioCodecFactory() :
CodecVector codecDynamicList(scanCodecDirectory()); CodecVector codecDynamicList(scanCodecDirectory());
if (codecDynamicList.empty()) if (codecDynamicList.empty())
ERROR("Error - No codecs available"); ERROR("No codecs available");
else { else {
for (CodecVector::const_iterator iter = codecDynamicList.begin(); for (CodecVector::const_iterator iter = codecDynamicList.begin();
iter != codecDynamicList.end() ; ++iter) { iter != codecDynamicList.end() ; ++iter) {
...@@ -99,7 +99,7 @@ AudioCodecFactory::getCodec(int payload) const ...@@ -99,7 +99,7 @@ AudioCodecFactory::getCodec(int payload) const
if (iter != codecsMap_.end()) if (iter != codecsMap_.end())
return iter->second; return iter->second;
else { else {
ERROR("CodecDescriptor: cannot find codec %i", payload); ERROR("Cannot find codec %i", payload);
return NULL; return NULL;
} }
} }
...@@ -166,7 +166,7 @@ std::vector<sfl::Codec*> AudioCodecFactory::scanCodecDirectory() ...@@ -166,7 +166,7 @@ std::vector<sfl::Codec*> AudioCodecFactory::scanCodecDirectory()
for (size_t i = 0 ; i < dirToScan.size() ; i++) { for (size_t i = 0 ; i < dirToScan.size() ; i++) {
std::string dirStr = dirToScan[i]; std::string dirStr = dirToScan[i];
DEBUG("CodecDescriptor: Scanning %s to find audio codecs....", dirStr.c_str()); DEBUG("Scanning %s to find audio codecs....", dirStr.c_str());
DIR *dir = opendir(dirStr.c_str()); DIR *dir = opendir(dirStr.c_str());
...@@ -202,7 +202,7 @@ sfl::Codec* AudioCodecFactory::loadCodec(const std::string &path) ...@@ -202,7 +202,7 @@ sfl::Codec* AudioCodecFactory::loadCodec(const std::string &path)
void * codecHandle = dlopen(path.c_str() , RTLD_LAZY); void * codecHandle = dlopen(path.c_str() , RTLD_LAZY);
if (!codecHandle) { if (!codecHandle) {
ERROR("%s\n", dlerror()); ERROR("%s", dlerror());
return NULL; return NULL;
} }
...@@ -212,7 +212,7 @@ sfl::Codec* AudioCodecFactory::loadCodec(const std::string &path) ...@@ -212,7 +212,7 @@ sfl::Codec* AudioCodecFactory::loadCodec(const std::string &path)
char *error = dlerror(); char *error = dlerror();
if (error) { if (error) {
ERROR("%s\n", error); ERROR("%s", error);
return NULL; return NULL;
} }
...@@ -231,7 +231,7 @@ void AudioCodecFactory::unloadCodec(CodecHandlePointer p) ...@@ -231,7 +231,7 @@ void AudioCodecFactory::unloadCodec(CodecHandlePointer p)
char *error = dlerror(); char *error = dlerror();
if (error) { if (error) {
ERROR("%s\n", error); ERROR("%s", error);
return; return;
} }
...@@ -251,7 +251,7 @@ sfl::Codec* AudioCodecFactory::instantiateCodec(int payload) const ...@@ -251,7 +251,7 @@ sfl::Codec* AudioCodecFactory::instantiateCodec(int payload) const
char *error = dlerror(); char *error = dlerror();
if (error) if (error)
ERROR("%s\n", error); ERROR("%s", error);
else else
return createCodec(); return createCodec();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment