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

Commit bce5ccac authored by Uma Mehta's avatar Uma Mehta Committed by Gerrit - the friendly Code Review server
Browse files

libstagefright: Handling SSR/Hardware error in Camcorder

Update the error to ERROR_IO incase of SSR or if the
media codec process is killed.
Add changes in Mpeg4Writer to save the recorded file
in case of ERROR_IO before exiting.

Change-Id: Ifc29123ccc9d4e537529e356f59049a0dfeb024b
parent fe763e1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2717,7 +2717,7 @@ status_t MPEG4Writer::Track::threadEntry() {
    // if err is ERROR_IO (ex: during SSR), return OK to save the
    // recorded file successfully. Session tear down will happen as part of
    // client callback
    if ((mIsAudio && (err == ERROR_IO)) || (err == ERROR_END_OF_STREAM)) {
    if ((err == ERROR_IO) || (err == ERROR_END_OF_STREAM)) {
        return OK;
    }
    return err;
+1 −1
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ void MediaCodecSource::signalEOS(status_t err) {
            output->mBufferQueue.clear();
            output->mEncoderReachedEOS = true;
            output->mErrorCode = err;
            if (err == OMX_ErrorHardware) {
            if (err == OMX_ErrorHardware || err == DEAD_OBJECT) {
                output->mErrorCode = ERROR_IO;
            }
            output->mCond.signal();