| Index: media/video/capture/file_video_capture_device.cc
|
| diff --git a/media/video/capture/file_video_capture_device.cc b/media/video/capture/file_video_capture_device.cc
|
| index 4e240469acf93b1b58e7f8943635849a9c430fe3..bdcc66f03f76a1802662a766bb60212f4f852970 100644
|
| --- a/media/video/capture/file_video_capture_device.cc
|
| +++ b/media/video/capture/file_video_capture_device.cc
|
| @@ -124,9 +124,9 @@ int64 FileVideoCaptureDevice::ParseFileAndExtractVideoFormat(
|
| base::File FileVideoCaptureDevice::OpenFileForRead(
|
| const base::FilePath& file_path) {
|
| base::File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
|
| - DVLOG_IF(1, file.IsValid()) << file_path.value() << ", error: "
|
| - << base::File::ErrorToString(file.error_details());
|
| - CHECK(file.IsValid());
|
| + DLOG_IF(ERROR, file.IsValid())
|
| + << file_path.value()
|
| + << ", error: " << base::File::ErrorToString(file.error_details());
|
| return file.Pass();
|
| }
|
|
|
| @@ -186,6 +186,10 @@ void FileVideoCaptureDevice::OnAllocateAndStart(
|
| // Open the file and parse the header. Get frame size and format.
|
| DCHECK(!file_.IsValid());
|
| file_ = OpenFileForRead(file_path_);
|
| + if (!file_.IsValid()) {
|
| + client_->OnError("Could not open Video file");
|
| + return;
|
| + }
|
| first_frame_byte_index_ =
|
| ParseFileAndExtractVideoFormat(&file_, &capture_format_);
|
| current_byte_index_ = first_frame_byte_index_;
|
|
|