From f888cedf170f6d3cc060cc14ad9c56918f3a03c3 Mon Sep 17 00:00:00 2001 From: xiaoqiny Date: Tue, 13 Jan 2015 17:59:04 +0800 Subject: libstagefright: handle error when B-frame is sent to MPEG4Writer Without this patch, writing B-frame to MediaMuxer will be blocked and cannot return a result. This may cause an endless progress bar shown in gallery when triming or muting some videos. Change-Id: Ib9f902a57da470c0357ec68aab00a35fbb26fb77 CRs-Fixed: 521005 --- include/media/stagefright/MediaAdapter.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/media/stagefright/MediaAdapter.h') diff --git a/include/media/stagefright/MediaAdapter.h b/include/media/stagefright/MediaAdapter.h index 369fce6..8622546 100644 --- a/include/media/stagefright/MediaAdapter.h +++ b/include/media/stagefright/MediaAdapter.h @@ -56,6 +56,8 @@ public: // deep copy, such that after pushBuffer return, the buffer can be re-used. status_t pushBuffer(MediaBuffer *buffer); + virtual void notifyError(status_t err); + private: Mutex mAdapterLock; // Make sure the read() wait for the incoming buffer. @@ -68,6 +70,8 @@ private: bool mStarted; sp mOutputFormat; + status_t mStatus; + DISALLOW_EVIL_CONSTRUCTORS(MediaAdapter); }; -- cgit v1.1