[FFmpeg-cvslog] libstagefright: return EOS if CustomSource::read() is called after decode_thread() returns

Mohamed Naufal git at videolan.org
Fri Oct 7 15:38:33 CEST 2011


ffmpeg | branch: master | Mohamed Naufal <naufal22 at gmail.com> | Fri Oct  7 18:17:29 2011 +0530| [23ea48f2f7caebbaac19a6a4d8c931c06e9bd2df] | committer: Mohamed Naufal

libstagefright: return EOS if CustomSource::read() is called after decode_thread() returns

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23ea48f2f7caebbaac19a6a4d8c931c06e9bd2df
---

 libavcodec/libstagefright.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp
index 6989357..7f3b785 100644
--- a/libavcodec/libstagefright.cpp
+++ b/libavcodec/libstagefright.cpp
@@ -104,6 +104,8 @@ public:
         Frame *frame;
         status_t ret;
 
+        if (s->thread_exited)
+            return ERROR_END_OF_STREAM;
         pthread_mutex_lock(&s->in_mutex);
 
         while (s->in_queue->empty())



More information about the ffmpeg-cvslog mailing list