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

Commit 3e9bf406 authored by Pannag Sanketi's avatar Pannag Sanketi
Browse files

Returning EOS in SurfaceMediaSource:read

In SurfaceMediaSource::read, if disconnect has already been called, then
ERROR_END_OF_STREAM should be returned rather that NO_INIT. Else, it
sometimes leads to a crash in mediarecorder stop() call.

Related to FactoryROM bug: 5332812

Change-Id: I22132538ab2501d084e0283876817b1ec3f64a1d
parent 669012d7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -764,8 +764,8 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer,
    // If the loop was exited as a result of stopping the recording,
    // it is OK
    if (mStopped) {
        LOGV("Read: SurfaceMediaSource is stopped. Returning NO_INIT;");
        return NO_INIT;
        LOGV("Read: SurfaceMediaSource is stopped. Returning ERROR_END_OF_STREAM.");
        return ERROR_END_OF_STREAM;
    }

    // Update the current buffer info