| Index: media/base/android/test_data_factory.cc
|
| diff --git a/media/base/android/test_data_factory.cc b/media/base/android/test_data_factory.cc
|
| index 0bf3782c306bdd1c89c37677434eeac599ddfdb2..cc434a82c712d450644db1fa9f4f37c5f65764f9 100644
|
| --- a/media/base/android/test_data_factory.cc
|
| +++ b/media/base/android/test_data_factory.cc
|
| @@ -60,7 +60,8 @@ TestDataFactory::TestDataFactory(const char* file_name_template,
|
| base::TimeDelta frame_period)
|
| : duration_(duration),
|
| frame_period_(frame_period),
|
| - starvation_mode_(false) {
|
| + starvation_mode_(false),
|
| + eos_reached_(false) {
|
| LoadPackets(file_name_template);
|
| }
|
|
|
| @@ -70,6 +71,9 @@ bool TestDataFactory::CreateChunk(DemuxerData* chunk, base::TimeDelta* delay) {
|
| DCHECK(chunk);
|
| DCHECK(delay);
|
|
|
| + if (eos_reached_)
|
| + return false;
|
| +
|
| *delay = base::TimeDelta();
|
|
|
| for (int i = 0; i < 4; ++i) {
|
| @@ -85,6 +89,7 @@ bool TestDataFactory::CreateChunk(DemuxerData* chunk, base::TimeDelta* delay) {
|
| return false;
|
|
|
| unit.is_end_of_stream = true;
|
| + eos_reached_ = true;
|
| break; // EOS units have no data.
|
| }
|
|
|
| @@ -104,6 +109,7 @@ bool TestDataFactory::CreateChunk(DemuxerData* chunk, base::TimeDelta* delay) {
|
| void TestDataFactory::SeekTo(const base::TimeDelta& seek_time) {
|
| regular_pts_ = seek_time;
|
| last_pts_ = base::TimeDelta();
|
| + eos_reached_ = false;
|
| }
|
|
|
| void TestDataFactory::LoadPackets(const char* file_name_template) {
|
|
|