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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 10827149: Check VideoFrame::IsValidConfig() prior to allocating buffers for FFmpeg. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: rebase Created 8 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/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index ca26e8eb3730403068abc3129ad45e00e31ebe2d..ba0fd8d773793814e2e21d4fec02537e6f33d4d7 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -89,6 +89,9 @@ int FFmpegVideoDecoder::GetVideoBuffer(AVCodecContext* codec_context,
natural_size = demuxer_stream_->video_decoder_config().natural_size();
}
+ if (!VideoFrame::IsValidConfig(format, size, natural_size))
+ return AVERROR(EINVAL);
+
scoped_refptr<VideoFrame> video_frame =
VideoFrame::CreateFrame(format, size, natural_size, kNoTimestamp());
« 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