Index: media/base/video_frame.cc |
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc |
index 6b3427db1aa936c1707b507f13e1070ed33710b0..b8774dcc85c16ba324a8b52bbdc1256bec92ebf5 100644 |
--- a/media/base/video_frame.cc |
+++ b/media/base/video_frame.cc |
@@ -764,10 +764,10 @@ int VideoFrame::row_bytes(size_t plane) const { |
return RowBytes(plane, format_, coded_size_.width()); |
} |
-int VideoFrame::rows(size_t plane) const { |
- DCHECK(IsValidPlane(plane, format_)); |
- int height = coded_size_.height(); |
- switch (format_) { |
+// static |
+int VideoFrame::Rows(size_t plane, VideoFrame::Format format, int height) { |
+ DCHECK(IsValidPlane(plane, format)); |
+ switch (format) { |
case VideoFrame::YV24: |
case VideoFrame::YV16: |
switch (plane) { |
@@ -821,11 +821,15 @@ int VideoFrame::rows(size_t plane) const { |
case VideoFrame::NATIVE_TEXTURE: |
break; |
} |
- NOTREACHED() << "Unsupported video frame format/plane: " |
- << format_ << "/" << plane; |
+ NOTREACHED() << "Unsupported video frame format/plane: " << format << "/" |
+ << plane; |
return 0; |
} |
+int VideoFrame::rows(size_t plane) const { |
+ return Rows(plane, format_, coded_size_.height()); |
+} |
+ |
uint8* VideoFrame::data(size_t plane) const { |
DCHECK(IsValidPlane(plane, format_)); |
return data_[plane]; |