[DirectShow] Fix potention undefined behavior on destruction
The exact warning is: > deleting object of polymorphic class type which has non-virtual destructor might cause undefined behavior Change-Id: I8f259def3f1f7f776fb31ace9dfcc7145426f5c0 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
@@ -49,7 +49,7 @@ class DirectShowIOSource
|
||||
{
|
||||
public:
|
||||
DirectShowIOSource(DirectShowEventLoop *loop);
|
||||
~DirectShowIOSource();
|
||||
virtual ~DirectShowIOSource();
|
||||
|
||||
void setDevice(QIODevice *device);
|
||||
void setAllocator(IMemAllocator *allocator);
|
||||
|
||||
@@ -41,7 +41,7 @@ class DirectShowMediaTypeEnum : public IEnumMediaTypes
|
||||
{
|
||||
public:
|
||||
DirectShowMediaTypeEnum(DirectShowMediaTypeList *list, int token, int index = 0);
|
||||
~DirectShowMediaTypeEnum();
|
||||
virtual ~DirectShowMediaTypeEnum();
|
||||
|
||||
// IUnknown
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
|
||||
@@ -143,6 +143,10 @@ DirectShowMediaTypeList::DirectShowMediaTypeList()
|
||||
{
|
||||
}
|
||||
|
||||
DirectShowMediaTypeList::~DirectShowMediaTypeList()
|
||||
{
|
||||
}
|
||||
|
||||
IEnumMediaTypes *DirectShowMediaTypeList::createMediaTypeEnum()
|
||||
{
|
||||
return new DirectShowMediaTypeEnum(this, m_mediaTypeToken, 0);
|
||||
|
||||
@@ -42,6 +42,7 @@ class DirectShowMediaTypeList : public IUnknown
|
||||
{
|
||||
public:
|
||||
DirectShowMediaTypeList();
|
||||
virtual ~DirectShowMediaTypeList();
|
||||
|
||||
IEnumMediaTypes *createMediaTypeEnum();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class DirectShowPinEnum : public IEnumPins
|
||||
{
|
||||
public:
|
||||
DirectShowPinEnum(const QList<IPin *> &pins);
|
||||
~DirectShowPinEnum();
|
||||
virtual ~DirectShowPinEnum();
|
||||
|
||||
// IUnknown
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
|
||||
|
||||
Reference in New Issue
Block a user