diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-07-05 17:43:22 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-07-05 17:43:22 +0100 |
| commit | 28cb6bdc4ad953433b7fc184181e116ac169987f (patch) | |
| tree | 802c828c57c46e4a2e8617ae3a095612a387c86b /rotord/libavwrapper.cpp | |
| parent | 6710aaddb7bb260dbef3006676799867ce865209 (diff) | |
fixed a deadlock in libavwrapper
Diffstat (limited to 'rotord/libavwrapper.cpp')
| -rwxr-xr-x | rotord/libavwrapper.cpp | 6 |
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; } |
