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

Commit d94e716a authored by Andreas Huber's avatar Andreas Huber
Browse files

Fix our software decoders to reset (more of) their internal state

properly on a transition from idle->loaded.

Change-Id: I56ccfeef24c391e50e42b522194206e35c7ab700
related-to-bug: 9105408
parent 7c684c62
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -604,6 +604,9 @@ void SoftAAC2::onReset() {
    // To make the codec behave the same before and after a reset, we need to invalidate the
    // streaminfo struct. This does that:
    mStreamInfo->sampleRate = 0;

    mSignalledError = false;
    mOutputPortSettingsChange = NONE;
}

void SoftAAC2::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
+5 −0
Original line number Diff line number Diff line
@@ -457,6 +457,11 @@ void SoftAMR::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
    }
}

void SoftAMR::onReset() {
    mSignalledError = false;
    mOutputPortSettingsChange = NONE;
}

}  // namespace android

android::SoftOMXComponent *createSoftOMXComponent(
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ protected:
    virtual void onQueueFilled(OMX_U32 portIndex);
    virtual void onPortFlushCompleted(OMX_U32 portIndex);
    virtual void onPortEnableCompleted(OMX_U32 portIndex, bool enabled);
    virtual void onReset();

private:
    enum {
+5 −0
Original line number Diff line number Diff line
@@ -571,6 +571,11 @@ void SoftMPEG4::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
    }
}

void SoftMPEG4::onReset() {
    mSignalledError = false;
    mOutputPortSettingsChange = NONE;
}

void SoftMPEG4::updatePortDefinitions() {
    OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(0)->mDef;
    def->format.video.nFrameWidth = mWidth;
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ protected:
    virtual void onQueueFilled(OMX_U32 portIndex);
    virtual void onPortFlushCompleted(OMX_U32 portIndex);
    virtual void onPortEnableCompleted(OMX_U32 portIndex, bool enabled);
    virtual void onReset();

private:
    enum {
Loading