PluginManager: Move reference counting in the MediaPlugin

* Ideally we should support this feature by default to allow
future improvements to the plugins management.
* Fixes the major memory corruption that lead to various
crashes on exit in MediaPlayer.
This commit is contained in:
Dario Casalinuovo
2016-10-31 23:39:32 +01:00
parent 42a3f9477d
commit 8023d6bafd
5 changed files with 15 additions and 9 deletions
+6
View File
@@ -13,6 +13,12 @@ class MediaPlugin {
public:
MediaPlugin();
virtual ~MediaPlugin();
private:
// needed for plug-in reference count management
friend class PluginManager;
int32 fRefCount;
};
class Decoder;
-2
View File
@@ -27,10 +27,8 @@ private:
virtual void _ReservedStreamer5();
MediaPlugin* fMediaPlugin;
int32 fRefCount;
uint32 fReserved[5];
// needed for plug-in reference count management
friend class PluginManager;
};