Skip to content

Commit

Permalink
uninstall filters in target dtor and ~Filter
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Oct 12, 2014
1 parent d2c3745 commit 6bdc79f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/AVPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ AVPlayer::AVPlayer(QObject *parent) :
AVPlayer::~AVPlayer()
{
stop();
QList<Filter*> filters(FilterManager::instance().videoFilters(this));
foreach (Filter *f, filters) {
uninstallFilter(f);
}
if (_audio) {
delete _audio;
_audio = 0;
Expand Down
1 change: 0 additions & 1 deletion src/QtAV/Filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class Q_AV_EXPORT Filter : public QObject
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enableChanged)
public:
Filter(QObject* parent = 0);
// Does nothing. uninstall() manually please
virtual ~Filter();
//isEnabled() then setContext
//TODO: parameter FrameContext
Expand Down
2 changes: 1 addition & 1 deletion src/filter/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Filter::Filter(FilterPrivate &d, QObject *parent)

Filter::~Filter()
{
//uninstall();
uninstall();
}

void Filter::setEnabled(bool enabled)
Expand Down

0 comments on commit 6bdc79f

Please sign in to comment.