projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git]
/
src
/
content
/
browser
/
renderer_host
/
media
/
video_capture_controller.cc
diff --git
a/src/content/browser/renderer_host/media/video_capture_controller.cc
b/src/content/browser/renderer_host/media/video_capture_controller.cc
index
f625a07
..
206797e
100644
(file)
--- a/
src/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/
src/content/browser/renderer_host/media/video_capture_controller.cc
@@
-320,6
+320,13
@@
void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData(
destination_height = new_unrotated_width;
}
const gfx::Size dimensions(destination_width, destination_height);
destination_height = new_unrotated_width;
}
const gfx::Size dimensions(destination_width, destination_height);
+ if (!media::VideoFrame::IsValidConfig(media::VideoFrame::I420,
+ dimensions,
+ gfx::Rect(dimensions),
+ dimensions)) {
+ return;
+ }
+
scoped_refptr<Buffer> buffer =
DoReserveOutputBuffer(media::VideoFrame::I420, dimensions);
scoped_refptr<Buffer> buffer =
DoReserveOutputBuffer(media::VideoFrame::I420, dimensions);
@@
-417,8
+424,6
@@
void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData(
// address all these #ifdef parts, see http://crbug.com/299611 .
NOTREACHED();
#endif // if !defined(AVOID_LIBYUV_FOR_ANDROID_WEBVIEW)
// address all these #ifdef parts, see http://crbug.com/299611 .
NOTREACHED();
#endif // if !defined(AVOID_LIBYUV_FOR_ANDROID_WEBVIEW)
- VideoCaptureFormat format(
- dimensions, frame_format.frame_rate, media::PIXEL_FORMAT_I420);
scoped_refptr<media::VideoFrame> frame =
media::VideoFrame::WrapExternalPackedMemory(
media::VideoFrame::I420,
scoped_refptr<media::VideoFrame> frame =
media::VideoFrame::WrapExternalPackedMemory(
media::VideoFrame::I420,
@@
-432,6
+437,9
@@
void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData(
base::TimeDelta(),
base::Closure());
DCHECK(frame);
base::TimeDelta(),
base::Closure());
DCHECK(frame);
+
+ VideoCaptureFormat format(
+ dimensions, frame_format.frame_rate, media::PIXEL_FORMAT_I420);
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,