Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdf37687 authored by Sadiq Sada's avatar Sadiq Sada Committed by Android (Google) Code Review
Browse files

Merge "Add reference counter for Filter" into main

parents ad69b815 08cae816
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -326,6 +326,8 @@ Filter::~Filter() {
    ALOGV("%s", __FUNCTION__);
    mFilterThreadRunning = true;
    std::vector<DemuxFilterEvent> events;

    mFilterCount += 1;
    // All the filter event callbacks in start are for testing purpose.
    switch (mType.mainType) {
        case DemuxFilterMainType::TS:
@@ -362,6 +364,8 @@ Filter::~Filter() {
::ndk::ScopedAStatus Filter::stop() {
    ALOGV("%s", __FUNCTION__);

    mFilterCount -= 1;

    mFilterThreadRunning = false;
    if (mFilterThread.joinable()) {
        mFilterThread.join();
+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ class Filter : public BnFilter {
    uint8_t mIpCidMonitored = 0;

    PlaybackStatus mIptvDvrPlaybackStatus;
    std::atomic<int> mFilterCount = 0;
};

}  // namespace tuner