summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-12-20 08:58:04 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-12-20 08:58:05 -0800
commit0fd58c9758d2083915864d3cc63df7495b497e52 (patch)
tree4b643a4a10f451e1b88531d496fce14bb2d43f48 /media/libmedia
parent7cd2dd3ae3278a50396886cf0b5c9a1277601816 (diff)
parent89b629b398e87095cf262692f4e476d605fe87ed (diff)
downloadframeworks_av-0fd58c9758d2083915864d3cc63df7495b497e52.zip
frameworks_av-0fd58c9758d2083915864d3cc63df7495b497e52.tar.gz
frameworks_av-0fd58c9758d2083915864d3cc63df7495b497e52.tar.bz2
Merge "Fix bug with discarded AudioRecord::read count"
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/AudioRecord.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index c2ef68c..9fda0a5 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -644,7 +644,8 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize)
break;
}
if (err == status_t(TIMED_OUT)) {
- err = 0;
+ // return partial transfer count
+ return read;
}
return ssize_t(err);
}