Chromium Code Reviews| Index: content/browser/media/capture/content_video_capture_device_core.cc |
| diff --git a/content/browser/media/capture/content_video_capture_device_core.cc b/content/browser/media/capture/content_video_capture_device_core.cc |
| index 3c507c6f46b6fcbe5811067de64ac6bd0fb641fb..b208ce82010e051969774d60a741e657a55eb3b0 100644 |
| --- a/content/browser/media/capture/content_video_capture_device_core.cc |
| +++ b/content/browser/media/capture/content_video_capture_device_core.cc |
| @@ -118,12 +118,14 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture( |
| // NATIVE_TEXTURE frames wrap a texture mailbox, which we don't have at the |
| // moment. We do not construct those frames. |
| if (params_.requested_format.pixel_format != media::PIXEL_FORMAT_TEXTURE) { |
| + const scoped_ptr<media::DataHandle> scoped_data_handle( |
|
miu
2015/04/15 19:12:40
Why is the DataHandle allowed to be destroyed whil
mcasas
2015/04/16 03:11:21
Since I'm taking in your suggestion below, this
co
|
| + output_buffer->GetDataHandle()); |
| *storage = media::VideoFrame::WrapExternalPackedMemory( |
| media::VideoFrame::I420, |
| coded_size, |
| gfx::Rect(visible_size), |
| visible_size, |
| - static_cast<uint8*>(output_buffer->data()), |
| + static_cast<uint8*>(scoped_data_handle->data()), |
| output_buffer->size(), |
| base::SharedMemory::NULLHandle(), |
| 0, |