summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/SurfaceMediaSource.cpp
diff options
context:
space:
mode:
authorPannag Sanketi <psanketi@google.com>2011-09-22 17:03:48 -0700
committerPannag Sanketi <psanketi@google.com>2011-09-22 17:03:48 -0700
commit3e9bf4061475ae0d01c57e32c13e63808aa3e31f (patch)
treee202bf8dfb7dc91a2de1248ccee3265740e07760 /media/libstagefright/SurfaceMediaSource.cpp
parent669012d77b00a2aacb6fd12837f2870f9ec17865 (diff)
downloadframeworks_av-3e9bf4061475ae0d01c57e32c13e63808aa3e31f.zip
frameworks_av-3e9bf4061475ae0d01c57e32c13e63808aa3e31f.tar.gz
frameworks_av-3e9bf4061475ae0d01c57e32c13e63808aa3e31f.tar.bz2
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
Diffstat (limited to 'media/libstagefright/SurfaceMediaSource.cpp')
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index 306f1f6..2b27ee2 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -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