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 8ca720e10431b4ba1349eef5ecb7eda716ddd98f..9529b095b9daa5e56516bd064e33a52f59560d0c 100644 |
--- a/media/mojo/common/media_type_converters.cc |
+++ b/media/mojo/common/media_type_converters.cc |
@@ -304,6 +304,14 @@ TypeConverter<scoped_refptr<media::AudioBuffer>, media::mojom::AudioBufferPtr>:: |
if (input->end_of_stream) |
return media::AudioBuffer::CreateEOSBuffer(); |
+ if (input->sample_format == media::kSampleFormatRaw) { |
+ uint8_t* data = input->data.data(); |
+ return media::AudioBuffer::CopyFrom( |
+ input->sample_format, input->channel_layout, input->channel_count, |
+ input->sample_rate, input->frame_count, &data, input->timestamp, |
+ input->data.size()); |
+ } |
+ |
// 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); |