| Index: content/common/media/media_param_traits.cc
|
| diff --git a/content/common/media/media_param_traits.cc b/content/common/media/media_param_traits.cc
|
| index df4eb71299c74efe6a29b0631a61d2c567f5688b..7c2bca4d72265e1f004bcc6b7fcdfde6afc4641b 100644
|
| --- a/content/common/media/media_param_traits.cc
|
| +++ b/content/common/media/media_param_traits.cc
|
| @@ -58,7 +58,7 @@ void ParamTraits<VideoCaptureParams>::Write(Message* m,
|
| const VideoCaptureParams& p) {
|
| m->WriteInt(p.width);
|
| m->WriteInt(p.height);
|
| - m->WriteInt(p.frame_per_second);
|
| + m->WriteInt(p.frame_rate);
|
| m->WriteInt(static_cast<int>(p.session_id));
|
| m->WriteInt(static_cast<int>(p.frame_size_type));
|
| }
|
| @@ -69,7 +69,7 @@ bool ParamTraits<VideoCaptureParams>::Read(const Message* m,
|
| int session_id, frame_size_type;
|
| if (!m->ReadInt(iter, &r->width) ||
|
| !m->ReadInt(iter, &r->height) ||
|
| - !m->ReadInt(iter, &r->frame_per_second) ||
|
| + !m->ReadInt(iter, &r->frame_rate) ||
|
| !m->ReadInt(iter, &session_id) ||
|
| !m->ReadInt(iter, &frame_size_type))
|
| return false;
|
| @@ -78,18 +78,8 @@ bool ParamTraits<VideoCaptureParams>::Read(const Message* m,
|
| r->frame_size_type =
|
| static_cast<media::VideoCaptureResolutionType>(
|
| frame_size_type);
|
| -
|
| - // TODO(wjia): Replace with IsValid() method on VideoCaptureParams.
|
| - if (r->width <= 0 || r->height <= 0 || r->frame_per_second <= 0 ||
|
| - r->frame_per_second > media::limits::kMaxFramesPerSecond ||
|
| - r->width > media::limits::kMaxDimension ||
|
| - r->height > media::limits::kMaxDimension ||
|
| - r->width * r->height > media::limits::kMaxCanvas ||
|
| - r->frame_size_type < 0 ||
|
| - r->frame_size_type >= media::MaxVideoCaptureResolutionType) {
|
| + if (!r->IsValid())
|
| return false;
|
| - }
|
| -
|
| return true;
|
| }
|
|
|
|
|