Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 8301011: Fix 99596. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index f59c665a0ed35d73fea6e9fa8c34e02b86108bd6..c9d9e9e79ae16a25ff37775dad62e2eafe806034 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -160,6 +160,14 @@ void FFmpegDemuxerStream::Read(const ReadCallback& read_callback) {
DCHECK(!read_callback.is_null());
base::AutoLock auto_lock(lock_);
+ // Don't accept any additional reads if we've been told to stop.
+ // The demuxer_ may have been destroyed in the pipleine thread.
+ //
+ // TODO(scherkus): it would be cleaner if we replied with an error message.
+ if (stopped_) {
+ return;
acolwell GONE FROM CHROMIUM 2011/10/14 21:37:35 I think it would be better to return an EndOfStrea
ddorwin 2011/10/14 23:41:54 Okay. I suppose we should be doing that in ReadTas
+ }
+
if (!buffer_queue_.empty()) {
// Dequeue a buffer send back.
scoped_refptr<Buffer> buffer = buffer_queue_.front();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698