Commit ef8f3a12 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //content/renderer/pepper/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: I3b56ca4ea0a4d4dac8bdae935a3eb114457f37a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382598Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803319}
parent fb298354
...@@ -355,7 +355,7 @@ void PepperMediaStreamVideoTrackHost::OnVideoFrame( ...@@ -355,7 +355,7 @@ void PepperMediaStreamVideoTrackHost::OnVideoFrame(
scoped_refptr<media::VideoFrame> frame = video_frame; scoped_refptr<media::VideoFrame> frame = video_frame;
// Drop alpha channel since we do not support it yet. // Drop alpha channel since we do not support it yet.
if (frame->format() == media::PIXEL_FORMAT_I420A) if (frame->format() == media::PIXEL_FORMAT_I420A)
frame = media::WrapAsI420VideoFrame(std::move(video_frame)); frame = media::WrapAsI420VideoFrame(video_frame);
PP_VideoFrame_Format ppformat = ToPpapiFormat(frame->format()); PP_VideoFrame_Format ppformat = ToPpapiFormat(frame->format());
if (frame->storage_type() == media::VideoFrame::STORAGE_GPU_MEMORY_BUFFER) { if (frame->storage_type() == media::VideoFrame::STORAGE_GPU_MEMORY_BUFFER) {
// NV12 is the only supported GMB pixel format at the moment, and there is // NV12 is the only supported GMB pixel format at the moment, and there is
......
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