Skip to content

Commit a1849fc

Browse files
committed
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
1 parent 904fb9d commit a1849fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

media/libstagefright/SurfaceMediaSource.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer,
764764
// If the loop was exited as a result of stopping the recording,
765765
// it is OK
766766
if (mStopped) {
767-
LOGV("Read: SurfaceMediaSource is stopped. Returning NO_INIT;");
768-
return NO_INIT;
767+
LOGV("Read: SurfaceMediaSource is stopped. Returning ERROR_END_OF_STREAM.");
768+
return ERROR_END_OF_STREAM;
769769
}
770770

771771
// Update the current buffer info

0 commit comments

Comments
 (0)