Index: media/mojo/common/mojo_decoder_buffer_converter.cc |
diff --git a/media/mojo/common/mojo_decoder_buffer_converter.cc b/media/mojo/common/mojo_decoder_buffer_converter.cc |
index d47e5f56a67644b34719a05660029b385dd34a8a..91fcbf8bb9c52661503bfdea8ca60615ff3a0708 100644 |
--- a/media/mojo/common/mojo_decoder_buffer_converter.cc |
+++ b/media/mojo/common/mojo_decoder_buffer_converter.cc |
@@ -20,26 +20,23 @@ namespace media { |
namespace { |
std::unique_ptr<mojo::DataPipe> CreateDataPipe(DemuxerStream::Type type) { |
- MojoCreateDataPipeOptions options; |
- options.struct_size = sizeof(MojoCreateDataPipeOptions); |
- options.flags = MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE; |
- options.element_num_bytes = 1; |
+ uint32_t capacity = 0; |
if (type == DemuxerStream::AUDIO) { |
// TODO(timav): Consider capacity calculation based on AudioDecoderConfig. |
- options.capacity_num_bytes = 512 * 1024; |
+ capacity = 512 * 1024; |
} else if (type == DemuxerStream::VIDEO) { |
// Video can get quite large; at 4K, VP9 delivers packets which are ~1MB in |
// size; so allow for some head room. |
// TODO(xhwang, sandersd): Provide a better way to customize this value. |
- options.capacity_num_bytes = 2 * (1024 * 1024); |
+ capacity = 2 * (1024 * 1024); |
} else { |
NOTREACHED() << "Unsupported type: " << type; |
// Choose an arbitrary size. |
- options.capacity_num_bytes = 512 * 1024; |
+ capacity = 512 * 1024; |
} |
- return base::MakeUnique<mojo::DataPipe>(options); |
+ return base::MakeUnique<mojo::DataPipe>(capacity); |
} |
bool IsPipeReadWriteError(MojoResult result) { |