Commit f273203e authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Commit Bot

Remove the IsValidConfig call in GetVideoBuffer.

The VideoFrame::IsValidConfig() call in
FFmpegVideoDecoder::GetVideoBuffer() is no longer necessary. It is
called by the frame_pool_.CreateFrame() call. The chain of calls is:
      VideoFramePool::CreateFrame()
  --> VideoFramePool::PoolImpl::CreateFrame()
  --> VideoFrame::CreateZeroInitializedFrame()
  --> VideoFrame::CreateFrameInternal()
  --> VideoFrame::CreateFrameWithLayout()
  --> VideoFrame::IsValidConfig()

Bug: N/A
Change-Id: Id597f6ef5eb2c144cbc6c7b2f97a1c751be67a1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042928Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/master@{#741353}
parent d86e3a88
......@@ -134,11 +134,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context,
gfx::Size coded_size(std::max(size.width(), codec_context->coded_width),
std::max(size.height(), codec_context->coded_height));
if (!VideoFrame::IsValidConfig(format, VideoFrame::STORAGE_UNKNOWN,
coded_size, gfx::Rect(size), natural_size)) {
return AVERROR(EINVAL);
}
// FFmpeg expects the initial allocation to be zero-initialized. Failure to
// do so can lead to uninitialized value usage. See http://crbug.com/390941
scoped_refptr<VideoFrame> video_frame = frame_pool_.CreateFrame(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment