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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 101623006: Created VideoFramePool to avoid unnecessary VideoFrame alloc/free. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PoolImpl destructor to make clang on the bots happy. Created 7 years 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
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 75289cef27bf26bb88d102931ca155e9ca2d6144..83c850d9c547a01651ad41add2f014af571df90d 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -92,8 +92,8 @@ int FFmpegVideoDecoder::GetVideoBuffer(AVCodecContext* codec_context,
return AVERROR(EINVAL);
scoped_refptr<VideoFrame> video_frame =
- VideoFrame::CreateFrame(format, size, gfx::Rect(size), natural_size,
- kNoTimestamp());
+ frame_pool_.CreateFrame(format, size, gfx::Rect(size),
+ natural_size, kNoTimestamp());
for (int i = 0; i < 3; i++) {
frame->base[i] = video_frame->data(i);

Powered by Google App Engine
This is Rietveld 408576698