Commit 038c2376 authored by JunHo Seo's avatar JunHo Seo Committed by Commit Bot

Copy duration to decrypted buffer after decryption.

This value is not copied during decryption, so it is missed.
We may consider copying it at CdmAdapter, but it seems CdmAdapter
ensures only fields in CdmInputBuffer. So this cl follows same
way as is_key_frame in DecryptingDemuxerStream.

Change-Id: I701aaa51d24792a3bdb41eaaf1cef12c751a58fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348243Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: JunHo Seo <junho0924.seo@lge.com>
Cr-Commit-Position: refs/heads/master@{#798035}
parent 5d402adc
...@@ -305,10 +305,12 @@ void DecryptingDemuxerStream::OnBufferDecrypted( ...@@ -305,10 +305,12 @@ void DecryptingDemuxerStream::OnBufferDecrypted(
DCHECK_EQ(status, Decryptor::kSuccess); DCHECK_EQ(status, Decryptor::kSuccess);
// Copy the key frame flag from the encrypted to decrypted buffer, assuming // Copy the key frame flag and duration from the encrypted to decrypted
// that the decryptor initialized the flag to false. // buffer.
if (pending_buffer_to_decrypt_->is_key_frame()) // TODO(crbug.com/1116263): Ensure all fields are copied by Decryptor.
decrypted_buffer->set_is_key_frame(true); decrypted_buffer->set_is_key_frame(
pending_buffer_to_decrypt_->is_key_frame());
decrypted_buffer->set_duration(pending_buffer_to_decrypt_->duration());
pending_buffer_to_decrypt_ = nullptr; pending_buffer_to_decrypt_ = nullptr;
state_ = kIdle; state_ = kIdle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment