summaryrefslogtreecommitdiffstats
path: root/media/tools/media_bench
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-04 09:52:27 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-04 09:52:27 +0000
commit9d0fe3dd69edff507e47300c4a3170fe7d17a935 (patch)
treea6aea5039a7b096574f8874c7077f0cf9116acf9 /media/tools/media_bench
parent5ab7c6ef21e22e41d9bc7742ea24428042dbed4f (diff)
downloadchromium_src-9d0fe3dd69edff507e47300c4a3170fe7d17a935.zip
chromium_src-9d0fe3dd69edff507e47300c4a3170fe7d17a935.tar.gz
chromium_src-9d0fe3dd69edff507e47300c4a3170fe7d17a935.tar.bz2
check for codec null pointer when printing error message
BUG=68115 TEST=media_bench.exe --verbose=48 --stream=audio out.webm.68798.1929 should print Error: Could not open codec (NULL) for c:\work\out.webm.68798.1929 Review URL: http://codereview.chromium.org/6044008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools/media_bench')
-rw-r--r--media/tools/media_bench/media_bench.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc
index 67e4569..1bf51f2 100644
--- a/media/tools/media_bench/media_bench.cc
+++ b/media/tools/media_bench/media_bench.cc
@@ -349,8 +349,8 @@ int main(int argc, const char** argv) {
// 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;
}