Index: media/mojo/common/media_type_converters.cc |
diff --git a/media/mojo/common/media_type_converters.cc b/media/mojo/common/media_type_converters.cc |
index 50dd25fd4d34b2f7730aa7907d2f07255f4d2242..924c391c9c8a1b0b2e1f5aa1b09550aea6c1c293 100644 |
--- a/media/mojo/common/media_type_converters.cc |
+++ b/media/mojo/common/media_type_converters.cc |
@@ -311,6 +311,14 @@ TypeConverter<scoped_refptr<media::AudioBuffer>, media::mojom::AudioBufferPtr>:: |
if (input->end_of_stream) |
return media::AudioBuffer::CreateEOSBuffer(); |
+ if (IsBitstream(input->sample_format)) { |
+ uint8_t* data = input->data.data(); |
+ return media::AudioBuffer::CopyBitstreamFrom( |
+ input->sample_format, input->channel_layout, input->channel_count, |
+ input->sample_rate, input->frame_count, &data, input->data.size(), |
+ input->timestamp); |
+ } |
+ |
// Setup channel pointers. AudioBuffer::CopyFrom() will only use the first |
// one in the case of interleaved data. |
std::vector<const uint8_t*> channel_ptrs(input->channel_count, nullptr); |