summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-07-01 08:35:25 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-01 08:35:25 -0700
commit5367190fddc327135a39f26a7113faa659bb31b9 (patch)
treea0c7a153fea234df48adfa3d9eea78dfe2f6bcc4 /media
parent5faaadffbfb272f6a5f686834dadaf5408cf0ed2 (diff)
parentd39e8f4c2319087c439b456d3793109330f1c8b0 (diff)
downloadframeworks_base-5367190fddc327135a39f26a7113faa659bb31b9.zip
frameworks_base-5367190fddc327135a39f26a7113faa659bb31b9.tar.gz
frameworks_base-5367190fddc327135a39f26a7113faa659bb31b9.tar.bz2
Merge "Return ERROR_END_OF_STREAM when the input source reaches eos"
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/avc/enc/AVCEncoder.cpp4
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp9
2 files changed, 9 insertions, 4 deletions
diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
index e3292e6..0096760 100644
--- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
@@ -475,7 +475,9 @@ status_t AVCEncoder::read(
}
status_t err = mSource->read(&mInputBuffer, options);
if (err != OK) {
- LOGE("Failed to read input video frame: %d", err);
+ if (err != ERROR_END_OF_STREAM) {
+ LOGE("Failed to read input video frame: %d", err);
+ }
outputBuffer->release();
return err;
}
diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
index 15ed219..d7249c1 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
@@ -398,10 +398,13 @@ status_t M4vH263Encoder::read(
}
// Ready for accepting an input video frame
- if (OK != mSource->read(&mInputBuffer, options)) {
- LOGE("Failed to read from data source");
+ status_t err = mSource->read(&mInputBuffer, options);
+ if (OK != err) {
+ if (err != ERROR_END_OF_STREAM) {
+ LOGE("Failed to read from data source");
+ }
outputBuffer->release();
- return UNKNOWN_ERROR;
+ return err;
}
if (mInputBuffer->size() - ((mVideoWidth * mVideoHeight * 3) >> 1) != 0) {