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
commitab23dc0443e874a82110119896cce0103d89a529 (patch)
tree74cda7dfa24522950c7881fe394120717f7d5d4b /media
parentcebcdaef5b559f4db2a9d8b305d9d7da03525b62 (diff)
parentba499b591db0e26081e38545493144755eb72fff (diff)
downloadframeworks_av-ab23dc0443e874a82110119896cce0103d89a529.zip
frameworks_av-ab23dc0443e874a82110119896cce0103d89a529.tar.gz
frameworks_av-ab23dc0443e874a82110119896cce0103d89a529.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) {