Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: media/cdm/ppapi/cdm_adapter.cc

Issue 374353004: Encrypted Media: Fix PpbBuffer::Destroy(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/cdm/ppapi/cdm_helpers.h » ('j') | media/cdm/ppapi/cdm_helpers.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/ppapi/cdm_adapter.cc
diff --git a/media/cdm/ppapi/cdm_adapter.cc b/media/cdm/ppapi/cdm_adapter.cc
index 10feef775442cd3f8dc658eb7e8fb5754ae69580..17128125a5fc3b64c66289a5fa02f08857a5c612 100644
--- a/media/cdm/ppapi/cdm_adapter.cc
+++ b/media/cdm/ppapi/cdm_adapter.cc
@@ -855,9 +855,9 @@ void CdmAdapter::DeliverBlock(int32_t result,
} else {
PpbBuffer* ppb_buffer =
static_cast<PpbBuffer*>(decrypted_block->DecryptedBuffer());
- buffer = ppb_buffer->buffer_dev();
decrypted_block_info.tracking_info.buffer_id = ppb_buffer->buffer_id();
decrypted_block_info.data_size = ppb_buffer->Size();
+ buffer = ppb_buffer->TakeBufferDev();
xhwang 2014/07/10 16:42:39 This call also clears buffer_id and size. That's w
ddorwin 2014/07/10 21:56:14 We never fixed the original naming. PpbBuffer isn'
xhwang 2014/07/10 22:37:33 How about just BufferImpl, which is consistent wit
ddorwin 2014/07/10 22:43:24 BufferImpl sounds good. In a different CL, of cour
xhwang 2014/07/10 22:48:50 Will do.
}
}
@@ -908,8 +908,6 @@ void CdmAdapter::DeliverFrame(
PpbBuffer* ppb_buffer =
static_cast<PpbBuffer*>(video_frame->FrameBuffer());
- buffer = ppb_buffer->buffer_dev();
-
decrypted_frame_info.tracking_info.timestamp = video_frame->Timestamp();
decrypted_frame_info.tracking_info.buffer_id = ppb_buffer->buffer_id();
decrypted_frame_info.format =
@@ -928,6 +926,8 @@ void CdmAdapter::DeliverFrame(
video_frame->Stride(cdm::VideoFrame::kUPlane);
decrypted_frame_info.strides[PP_DECRYPTEDFRAMEPLANES_V] =
video_frame->Stride(cdm::VideoFrame::kVPlane);
+
+ buffer = ppb_buffer->TakeBufferDev();
}
}
pp::ContentDecryptor_Private::DeliverFrame(buffer, decrypted_frame_info);
ddorwin 2014/07/10 21:56:14 nit: add an empty line for consistency (and becaus
xhwang 2014/07/10 22:37:33 Done.
@@ -956,11 +956,13 @@ void CdmAdapter::DeliverSamples(int32_t result,
} else {
PpbBuffer* ppb_buffer =
static_cast<PpbBuffer*>(audio_frames->FrameBuffer());
- buffer = ppb_buffer->buffer_dev();
+
decrypted_sample_info.tracking_info.buffer_id = ppb_buffer->buffer_id();
decrypted_sample_info.data_size = ppb_buffer->Size();
decrypted_sample_info.format =
CdmAudioFormatToPpDecryptedSampleFormat(audio_frames->Format());
+
+ buffer = ppb_buffer->TakeBufferDev();
}
}
« no previous file with comments | « no previous file | media/cdm/ppapi/cdm_helpers.h » ('j') | media/cdm/ppapi/cdm_helpers.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698