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

Unified Diff: media/mojo/services/mojo_demuxer_stream_impl.cc

Issue 796143003: Fix EOS buffer handling in spork. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « media/mojo/services/mojo_demuxer_stream_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_demuxer_stream_impl.cc
diff --git a/media/mojo/services/mojo_demuxer_stream_impl.cc b/media/mojo/services/mojo_demuxer_stream_impl.cc
index 1554f1aef362685b200a435387e62dd81be8ad90..392fa98b22bdb991f7f1b640a9c0acd70630bd70 100644
--- a/media/mojo/services/mojo_demuxer_stream_impl.cc
+++ b/media/mojo/services/mojo_demuxer_stream_impl.cc
@@ -46,12 +46,14 @@ void MojoDemuxerStreamImpl::OnBufferReady(
}
}
- // Serialize the data section of the DecoderBuffer into our pipe.
- uint32_t num_bytes = buffer->data_size();
- CHECK_EQ(WriteDataRaw(stream_pipe_.get(), buffer->data(), &num_bytes,
- MOJO_READ_DATA_FLAG_ALL_OR_NONE),
- MOJO_RESULT_OK);
- CHECK_EQ(num_bytes, static_cast<uint32_t>(buffer->data_size()));
+ if (!buffer->end_of_stream()) {
+ // Serialize the data section of the DecoderBuffer into our pipe.
+ uint32_t num_bytes = buffer->data_size();
+ CHECK_EQ(WriteDataRaw(stream_pipe_.get(), buffer->data(), &num_bytes,
+ MOJO_READ_DATA_FLAG_ALL_OR_NONE),
+ MOJO_RESULT_OK);
+ CHECK_EQ(num_bytes, static_cast<uint32_t>(buffer->data_size()));
+ }
// TODO(dalecurtis): Once we can write framed data to the DataPipe, fill via
// the producer handle and then read more to keep the pipe full. Waiting for
« no previous file with comments | « media/mojo/services/mojo_demuxer_stream_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698