| Index: media/filters/ffmpeg_video_decoder.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
| index ff14e89d3711196a713a3e562ee2d975fae758d9..1d784c73961c79081b2328d0aded98b5a4ae4902 100644
|
| --- a/media/filters/ffmpeg_video_decoder.cc
|
| +++ b/media/filters/ffmpeg_video_decoder.cc
|
| @@ -55,8 +55,10 @@ static int GetThreadCount(AVCodecID codec_id) {
|
| }
|
|
|
| FFmpegVideoDecoder::FFmpegVideoDecoder(
|
| - const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
|
| + ThreadingMode threading_mode)
|
| : task_runner_(task_runner),
|
| + threading_mode_(threading_mode),
|
| weak_factory_(this),
|
| state_(kUninitialized) {
|
| }
|
| @@ -369,6 +371,8 @@ bool FFmpegVideoDecoder::ConfigureDecoder() {
|
| // for damaged macroblocks, and set our error detection sensitivity.
|
| codec_context_->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
|
| codec_context_->thread_count = GetThreadCount(codec_context_->codec_id);
|
| + codec_context_->thread_type =
|
| + threading_mode_ == THREADING_SLICE ? FF_THREAD_SLICE : FF_THREAD_FRAME;
|
| codec_context_->opaque = this;
|
| codec_context_->flags |= CODEC_FLAG_EMU_EDGE;
|
| codec_context_->get_buffer = GetVideoBufferImpl;
|
|
|