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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user