Loading media/libstagefright/codecs/avc/enc/AVCEncoder.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -391,8 +391,18 @@ status_t AVCEncoder::read( if (err != OK) { LOGE("Failed to read input video frame: %d", err); outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return err; } if (mInputBuffer->size() - ((mVideoWidth * mVideoHeight * 3) >> 1) != 0) { outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return UNKNOWN_ERROR; } int64_t timeUs; CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)); outputBuffer->meta_data()->setInt64(kKeyTime, timeUs); Loading media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -292,8 +292,18 @@ status_t M4vH263Encoder::read( if (OK != mSource->read(&mInputBuffer, options)) { LOGE("Failed to read from data source"); outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return UNKNOWN_ERROR; } if (mInputBuffer->size() - ((mVideoWidth * mVideoHeight * 3) >> 1) != 0) { outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return UNKNOWN_ERROR; } int64_t timeUs; CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)); if (mNextModTimeUs > timeUs) { Loading Loading
media/libstagefright/codecs/avc/enc/AVCEncoder.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -391,8 +391,18 @@ status_t AVCEncoder::read( if (err != OK) { LOGE("Failed to read input video frame: %d", err); outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return err; } if (mInputBuffer->size() - ((mVideoWidth * mVideoHeight * 3) >> 1) != 0) { outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return UNKNOWN_ERROR; } int64_t timeUs; CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)); outputBuffer->meta_data()->setInt64(kKeyTime, timeUs); Loading
media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -292,8 +292,18 @@ status_t M4vH263Encoder::read( if (OK != mSource->read(&mInputBuffer, options)) { LOGE("Failed to read from data source"); outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return UNKNOWN_ERROR; } if (mInputBuffer->size() - ((mVideoWidth * mVideoHeight * 3) >> 1) != 0) { outputBuffer->release(); mInputBuffer->release(); mInputBuffer = NULL; return UNKNOWN_ERROR; } int64_t timeUs; CHECK(mInputBuffer->meta_data()->findInt64(kKeyTime, &timeUs)); if (mNextModTimeUs > timeUs) { Loading