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

Unified Diff: media/tools/media_bench/media_bench.cc

Issue 6044008: check for codec null pointer when printing error message... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/media_bench/media_bench.cc
===================================================================
--- media/tools/media_bench/media_bench.cc (revision 70405)
+++ media/tools/media_bench/media_bench.cc (working copy)
@@ -349,8 +349,8 @@
// Initialize our codec.
if (avcodec_open(codec_context, codec) < 0) {
std::cerr << "Error: Could not open codec "
- << codec_context->codec->name << " for "
- << in_path.value() << std::endl;
+ << (codec_context->codec ? codec_context->codec->name : "(NULL)")
+ << " for " << in_path.value() << std::endl;
return 1;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698