| Index: services/media/framework_ffmpeg/ffmpeg_decoder.cc
|
| diff --git a/services/media/framework_ffmpeg/ffmpeg_decoder.cc b/services/media/framework_ffmpeg/ffmpeg_decoder.cc
|
| index d482e6b2ebcf3005f56c400d714d11f157f5741c..6a5f8682364e09902ebe1cf910c80a6dd3c728dd 100644
|
| --- a/services/media/framework_ffmpeg/ffmpeg_decoder.cc
|
| +++ b/services/media/framework_ffmpeg/ffmpeg_decoder.cc
|
| @@ -16,16 +16,19 @@ Result FfmpegDecoder::Create(const StreamType& stream_type,
|
|
|
| AvCodecContextPtr av_codec_context(AvCodecContext::Create(stream_type));
|
| if (!av_codec_context) {
|
| + LOG(ERROR) << "couldn't create codec context";
|
| return Result::kUnsupportedOperation;
|
| }
|
|
|
| AVCodec* ffmpeg_decoder = avcodec_find_decoder(av_codec_context->codec_id);
|
| if (ffmpeg_decoder == nullptr) {
|
| + LOG(ERROR) << "couldn't find decoder context";
|
| return Result::kUnsupportedOperation;
|
| }
|
|
|
| int r = avcodec_open2(av_codec_context.get(), ffmpeg_decoder, nullptr);
|
| if (r < 0) {
|
| + LOG(ERROR) << "couldn't open the decoder " << r;
|
| return Result::kUnknownError;
|
| }
|
|
|
| @@ -39,6 +42,7 @@ Result FfmpegDecoder::Create(const StreamType& stream_type,
|
| new FfmpegVideoDecoder(std::move(av_codec_context)));
|
| break;
|
| default:
|
| + LOG(ERROR) << "unsupported codec type " << av_codec_context->codec_type;
|
| return Result::kUnsupportedOperation;
|
| }
|
|
|
|
|