summaryrefslogtreecommitdiff
path: root/rotord/libavwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/libavwrapper.cpp')
-rwxr-xr-xrotord/libavwrapper.cpp6
1 files changed, 3 insertions, 3 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;
}