Merge "Return ERROR_END_OF_STREAM when the input source reaches eos"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user