From 28cb6bdc4ad953433b7fc184181e116ac169987f Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 5 Jul 2013 17:43:22 +0100 Subject: fixed a deadlock in libavwrapper --- rotord/libavwrapper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rotord/libavwrapper.cpp') 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; } -- cgit v1.2.3