Index: media/capture/video/file_video_capture_device_factory.cc |
diff --git a/media/capture/video/file_video_capture_device_factory.cc b/media/capture/video/file_video_capture_device_factory.cc |
index 1d7ae1264300dae28b89711e4b52f6ffcc25f3cd..11602dee4a9ae59fad91bdf977e25e112b045005 100644 |
--- a/media/capture/video/file_video_capture_device_factory.cc |
+++ b/media/capture/video/file_video_capture_device_factory.cc |
@@ -63,13 +63,16 @@ void FileVideoCaptureDeviceFactory::GetDeviceSupportedFormats( |
const VideoCaptureDevice::Name& device, |
VideoCaptureFormats* supported_formats) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- base::File file = |
+ scoped_ptr<base::MemoryMappedFile> mapped_file = |
FileVideoCaptureDevice::OpenFileForRead(GetFilePathFromCommandLine()); |
- if (!file.IsValid()) |
+ if (!mapped_file) |
return; |
VideoCaptureFormat capture_format; |
- FileVideoCaptureDevice::ParseFileAndExtractVideoFormat(&file, |
- &capture_format); |
+ int frame_size; |
+ if (FileVideoCaptureDevice::ParseFileAndExtractVideoFormat( |
+ mapped_file.get(), &capture_format, &frame_size) < 0) { |
+ return; |
+ } |
supported_formats->push_back(capture_format); |
} |