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

Unified Diff: services/media/framework/parts/lpcm_reformatter.cc

Issue 1814553002: Motown: Improvements to packet definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added a comment. Created 4 years, 9 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 | « services/media/framework/packet.cc ('k') | services/media/framework/stages/output.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/framework/parts/lpcm_reformatter.cc
diff --git a/services/media/framework/parts/lpcm_reformatter.cc b/services/media/framework/parts/lpcm_reformatter.cc
index 91c86f2eb8f2ff61abf4636864671ad832cf0599..79b5458a5b4995e33f8b018110f13e23450b5eb5 100644
--- a/services/media/framework/parts/lpcm_reformatter.cc
+++ b/services/media/framework/parts/lpcm_reformatter.cc
@@ -249,8 +249,7 @@ bool LpcmReformatterImpl<TIn, TOut>::TransformPacket(
if (in_size == 0) {
// Zero-sized input packet. Make a copy.
*output = Packet::Create(
- input->presentation_time(),
- input->duration(),
+ input->pts(),
input->end_of_stream(),
0,
nullptr,
@@ -258,7 +257,7 @@ bool LpcmReformatterImpl<TIn, TOut>::TransformPacket(
return true;
}
- size_t frame_count = input->duration();
+ size_t frame_count = in_type_.frame_count(in_size);
uint64_t out_size = out_type_.min_buffer_size(frame_count);
void* buffer = allocator->AllocatePayloadBuffer(out_size);
@@ -285,8 +284,7 @@ bool LpcmReformatterImpl<TIn, TOut>::TransformPacket(
}
*output = Packet::Create(
- input->presentation_time(),
- frame_count,
+ input->pts(),
input->end_of_stream(),
out_size,
buffer,
« no previous file with comments | « services/media/framework/packet.cc ('k') | services/media/framework/stages/output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698