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

Unified Diff: media/mojo/common/media_type_converters.cc

Issue 2050323002: media: Fix mojo DecoderBuffer type converter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42e2febdb2ee63ba5fe13650af21dd3d5f43880a..d809016a9a8255f185cb822711d8a8e41bd614d4 100644
--- a/media/mojo/common/media_type_converters.cc
+++ b/media/mojo/common/media_type_converters.cc
@@ -473,7 +473,10 @@ TypeConverter<scoped_refptr<media::DecoderBuffer>,
scoped_refptr<media::DecoderBuffer> buffer(
new media::DecoderBuffer(input->data_size));
- buffer->CopySideDataFrom(&input->side_data.front(), input->side_data.size());
+ if (!input->side_data.empty()) {
+ buffer->CopySideDataFrom(&input->side_data.front(),
+ input->side_data.size());
+ }
buffer->set_timestamp(
base::TimeDelta::FromMicroseconds(input->timestamp_usec));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698