diff options
author | Andreas Huber <andih@google.com> | 2010-02-23 13:45:33 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-02-23 14:06:38 -0800 |
commit | 5295c0c55d41a2906ea7f65a3f22e6278cb17d4b (patch) | |
tree | 98a85c677c483627a1e9c1a2955fd7c58d90b7a8 /media/libstagefright/OMXCodec.cpp | |
parent | bd5d93f21e6f79c6d9ebe9d77542c3090d4a7ff4 (diff) | |
download | frameworks_av-5295c0c55d41a2906ea7f65a3f22e6278cb17d4b.zip frameworks_av-5295c0c55d41a2906ea7f65a3f22e6278cb17d4b.tar.gz frameworks_av-5295c0c55d41a2906ea7f65a3f22e6278cb17d4b.tar.bz2 |
Propagate errors all the way through the MediaSources and send either MEDIA_PLAYBACK_COMPLETE or MEDIA_ERROR depending on the final reason for running out of buffers to play back.
related-to-bug: 2463749
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 4075ec1..974413d 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1933,6 +1933,7 @@ void OMXCodec::drainInputBuffer(BufferInfo *info) { CODEC_LOGV("signalling end of input stream."); flags |= OMX_BUFFERFLAG_EOS; + mFinalStatus = err; mSignalledEOS = true; } else { mNoMoreOutputData = false; @@ -2411,7 +2412,7 @@ status_t OMXCodec::read( } if (mFilledBuffers.empty()) { - return ERROR_END_OF_STREAM; + return mSignalledEOS ? mFinalStatus : ERROR_END_OF_STREAM; } if (mOutputPortSettingsHaveChanged) { |