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

Unified Diff: media/video/ffmpeg_video_decode_engine.cc

Issue 7137002: Don't forget the ffmpeg input buffer padding when allocating a codec's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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/video/ffmpeg_video_decode_engine.cc
===================================================================
--- media/video/ffmpeg_video_decode_engine.cc (revision 87540)
+++ media/video/ffmpeg_video_decode_engine.cc (working copy)
@@ -72,10 +72,12 @@
if (config.extra_data() != NULL) {
codec_context_->extradata_size = config.extra_data_size();
- codec_context_->extradata =
- reinterpret_cast<uint8_t*>(av_malloc(config.extra_data_size()));
+ codec_context_->extradata = reinterpret_cast<uint8_t*>(
+ av_malloc(config.extra_data_size() + FF_INPUT_BUFFER_PADDING_SIZE));
memcpy(codec_context_->extradata, config.extra_data(),
config.extra_data_size());
+ memset(codec_context_->extradata + config.extra_data_size(), '\0',
+ FF_INPUT_BUFFER_PADDING_SIZE);
}
// Enable motion vector search (potentially slow), strong deblocking filter
« 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