Skip to content

Commit

Permalink
media/gpu/test/EncodedDataHelper: Fix a crash bug in reading IvfFrame…
Browse files Browse the repository at this point in the history
…Header

This fixes a bug of EncodedDataHelper in reading ivf frame
header.

TBR=hiroh@chromium.org

(cherry picked from commit f579167)

Bug: 1098142
Test: video.DecodeAccelSanity.vp9_1
Change-Id: Icaa6d6a41784bbc1b3bc1f7d967a35abb5635743
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2262022
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: David Staessens <dstaessens@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#781700}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264799
Reviewed-by: Tao Wu <wutao@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/branch-heads/4181@{#6}
Cr-Branched-From: c3466f0-refs/heads/master@{#781470}
  • Loading branch information
Hirokazu Honda authored and Commit Bot committed Jun 24, 2020
1 parent a2c7a1d commit fc13168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion media/gpu/test/video_test_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ base::Optional<IvfFrameHeader> EncodedDataHelper::GetNextIvfFrameHeader()
return base::nullopt;
}
return GetIvfFrameHeader(base::span<const uint8_t>(
reinterpret_cast<const uint8_t*>(data_[pos]), kIvfFrameHeaderSize));
reinterpret_cast<const uint8_t*>(&data_[pos]), kIvfFrameHeaderSize));
}

base::Optional<IvfFrame> EncodedDataHelper::ReadNextIvfFrame() {
Expand Down

0 comments on commit fc13168

Please sign in to comment.