diff options
author | Martin Storsjo <martin@martin.st> | 2012-08-29 14:49:28 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2012-08-29 15:38:25 +0300 |
commit | 02d18453d54a05c275c03b72a8290f3c9a964446 (patch) | |
tree | 71c31526481072f937eb9d28ee9d6bcc3d976979 | |
parent | 4b60ac04a878eaf8344b56189509ccd6925855c2 (diff) | |
download | frameworks_av-02d18453d54a05c275c03b72a8290f3c9a964446.zip frameworks_av-02d18453d54a05c275c03b72a8290f3c9a964446.tar.gz frameworks_av-02d18453d54a05c275c03b72a8290f3c9a964446.tar.bz2 |
MPEG2TSWriter: Read more immediately if an empty buffer is received
If writing encoded data from an OMXCodec, the last buffer can be
an empty buffer (with the EOS flag set, which isn't propagated to
MediaBuffer). If we don't retry reading, we won't ever get the
EOS error and thus won't properly signal that the source is done.
Change-Id: Ibe01dbcd0637fbf0c2529a277e9f208c48e0e8ab
-rw-r--r-- | media/libstagefright/MPEG2TSWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG2TSWriter.cpp b/media/libstagefright/MPEG2TSWriter.cpp index 92f12af..c9ed5bb 100644 --- a/media/libstagefright/MPEG2TSWriter.cpp +++ b/media/libstagefright/MPEG2TSWriter.cpp @@ -419,6 +419,8 @@ void MPEG2TSWriter::SourceInfo::onMessageReceived(const sp<AMessage> &msg) { } else { postAVCFrame(buffer); } + } else { + readMore(); } buffer->release(); |