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

Unified Diff: services/media/framework_ffmpeg/ffmpeg_decoder.cc

Issue 1923763002: Motown: Ffmpeg video decoder (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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: 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;
}

Powered by Google App Engine
This is Rietveld 408576698