| Index: media/filters/ffmpeg_video_decoder.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
| index 606968b2141269ab1262ea9d3e5dbe8ad5d57d6b..ad30943d1d0284fc6d0c4946bd20643b7673d226 100644
|
| --- a/media/filters/ffmpeg_video_decoder.cc
|
| +++ b/media/filters/ffmpeg_video_decoder.cc
|
| @@ -21,6 +21,7 @@
|
| #include "media/base/bind_to_current_loop.h"
|
| #include "media/base/decoder_buffer.h"
|
| #include "media/base/limits.h"
|
| +#include "media/base/media_log.h"
|
| #include "media/base/media_switches.h"
|
| #include "media/base/timestamp_constants.h"
|
| #include "media/base/video_frame.h"
|
| @@ -112,8 +113,10 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
|
| return avcodec_find_decoder(VideoCodecToCodecID(codec)) != nullptr;
|
| }
|
|
|
| -FFmpegVideoDecoder::FFmpegVideoDecoder()
|
| - : state_(kUninitialized), decode_nalus_(false) {
|
| +FFmpegVideoDecoder::FFmpegVideoDecoder(scoped_refptr<MediaLog> media_log)
|
| + : media_log_(std::move(media_log)),
|
| + state_(kUninitialized),
|
| + decode_nalus_(false) {
|
| thread_checker_.DetachFromThread();
|
| }
|
|
|
| @@ -358,7 +361,9 @@ bool FFmpegVideoDecoder::FFmpegDecode(
|
| &packet);
|
| // Log the problem if we can't decode a video frame and exit early.
|
| if (result < 0) {
|
| - LOG(ERROR) << "Error decoding video: " << buffer->AsHumanReadableString();
|
| + MEDIA_LOG(DEBUG, media_log_)
|
| + << "avcodec_decode_video2(): " << AVErrorToString(result) << ", at "
|
| + << buffer->AsHumanReadableString();
|
| return false;
|
| }
|
|
|
|
|