From a9e1ab7ecbb4a9f33ba773444a619f494bbca76a Mon Sep 17 00:00:00 2001
From: Krisjanis Rijnieks <krisjanis.rijnieks@gmail.com>
Date: Wed, 2 Mar 2016 18:07:10 +0100
Subject: [PATCH] Add minimal refactoring to `MediaServer`

---
 src/MediaServer/MediaServer.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/MediaServer/MediaServer.cpp b/src/MediaServer/MediaServer.cpp
index 186bd59..0c74132 100644
--- a/src/MediaServer/MediaServer.cpp
+++ b/src/MediaServer/MediaServer.cpp
@@ -204,17 +204,23 @@ void MediaServer::unloadVideo(string & path){
 	}
 	// Reference count 0 or less, let's unload the video
 	ofLogNotice("MediaServer") << "Removing video " << path;
+	
 	// Distroy video source
 	if(loadedSources.count(path)){
-		ofLogNotice("MediaServer") << "Source count before video removal: " << loadedSources.size() << endl;
+		ofLogNotice("MediaServer")
+			<< "Source count before video removal: "
+			<< loadedSources.size() << endl;
 		videoSource->clear();
 		map <string, BaseSource *>::iterator it = loadedSources.find(path);
 		delete it->second;
 		loadedSources.erase(it);
-		ofLogNotice("MediaServer") << "Source count after video removal: " << loadedSources.size() << endl;
+		ofLogNotice("MediaServer")
+			<< "Source count after video removal: "
+			<< loadedSources.size() << endl;
 		ofNotifyEvent(onVideoUnloaded, path, this);
 		return;
 	}
+	
 	// Something wrong here, we should be out of the routine by now
 	stringstream failss;
 	failss << "Failed to remove video source: " << path;