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

Commit 8a8bc683 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

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

parents 04bd2713 d94e716a
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