Index: cc/resources/video_resource_updater.cc |
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc |
index e6827ee3315c57c4dc789be81d3220948e547c74..1354e9e59153ba6e9e63b51e851a2769be9b7552 100644 |
--- a/cc/resources/video_resource_updater.cc |
+++ b/cc/resources/video_resource_updater.cc |
@@ -132,18 +132,29 @@ bool VideoResourceUpdater::PlaneResourceMatchesUniqueID( |
const PlaneResource& plane_resource, |
const media::VideoFrame* video_frame, |
size_t plane_index) { |
- return plane_resource.frame_ptr == video_frame && |
- plane_resource.plane_index == plane_index && |
- plane_resource.timestamp == video_frame->timestamp(); |
+ if (plane_resource.frame_ptr == video_frame && |
+ plane_resource.plane_index == plane_index && |
+ plane_resource.timestamp == video_frame->timestamp()) { |
+ bool video_frame_in_resource; |
miu
2016/02/22 21:17:37
There's a helper method in VideoFrameMetadata to a
xjz
2016/02/23 03:36:03
Done.
|
+ if (video_frame->metadata()->GetBoolean( |
+ media::VideoFrameMetadata::RESOURCE_UPDATER_FLAG, |
+ &video_frame_in_resource)) |
+ return video_frame_in_resource; |
+ else |
+ return false; |
+ } |
+ return false; |
} |
void VideoResourceUpdater::SetPlaneResourceUniqueId( |
- const media::VideoFrame* video_frame, |
+ media::VideoFrame* video_frame, |
size_t plane_index, |
PlaneResource* plane_resource) { |
plane_resource->frame_ptr = video_frame; |
plane_resource->plane_index = plane_index; |
plane_resource->timestamp = video_frame->timestamp(); |
+ video_frame->metadata()->SetBoolean( |
+ media::VideoFrameMetadata::RESOURCE_UPDATER_FLAG, true); |
} |
VideoFrameExternalResources::VideoFrameExternalResources() |