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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 9295020: Fix ChunkDemuxer seek deadlock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 8 years, 11 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
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 048cbe517a5ed7d7d29cf911fef47486532de979..67904e0b0f49a5d4c2f97019a5ced2b49ed326ef 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -29,7 +29,7 @@ namespace media {
// decoding thread, FFmpeg treats having one thread the same as having zero
// threads (i.e., avcodec_decode_video() will execute on the calling thread).
// Yet another reason for having two threads :)
-static const int kDecodeThreads = 2;
+static const int kDecodeThreads = 1;
Ami GONE FROM CHROMIUM 2012/01/27 23:44:58 ??
acolwell GONE FROM CHROMIUM 2012/01/29 03:00:41 This was to temporarily make valgrind shutup about
static const int kMaxDecodeThreads = 16;
// Returns the number of threads given the FFmpeg CodecID. Also inspects the
@@ -221,6 +221,11 @@ void FFmpegVideoDecoder::DoDecodeBuffer(const scoped_refptr<Buffer>& buffer) {
DCHECK_NE(state_, kDecodeFinished);
DCHECK(!read_cb_.is_null());
+ if (!buffer) {
Ami GONE FROM CHROMIUM 2012/01/27 23:44:58 GpuVideoDecoder::RequestBufferDecode needs to simi
acolwell GONE FROM CHROMIUM 2012/01/29 03:00:41 Done.
+ DeliverFrame(NULL);
+ return;
+ }
+
// During decode, because reads are issued asynchronously, it is possible to
// receive multiple end of stream buffers since each read is acked. When the
// first end of stream buffer is read, FFmpeg may still have frames queued

Powered by Google App Engine
This is Rietveld 408576698