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

Unified Diff: media/filters/audio_file_reader.cc

Issue 7785003: Fix crash in AudioFileReader::Read() by checking for properly initialized AVCodec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/filters/audio_file_reader.cc
===================================================================
--- media/filters/audio_file_reader.cc (revision 98708)
+++ media/filters/audio_file_reader.cc (working copy)
@@ -91,6 +91,10 @@
}
result = av_seek_frame(format_context_, 0, 0, 0);
+ } else {
+ DLOG(WARNING) << "AudioFileReader::Open() : could not find codec -"
scherkus (not reviewing) 2011/08/30 20:25:33 the indentation is wrong here -- could you TBR a p
+ << " result: " << result;
+ return false;
}
return true;
@@ -116,8 +120,8 @@
if (audio_data.size() != channels)
return false;
- DCHECK(format_context_ && codec_context_);
- if (!format_context_ || !codec_context_) {
+ DCHECK(format_context_ && codec_context_ && codec_);
+ if (!format_context_ || !codec_context_ || !codec_) {
DLOG(WARNING) << "AudioFileReader::Read() : reader is not opened!";
return false;
}
« 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