OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/filters/source_buffer_stream.h" | 5 #include "media/filters/source_buffer_stream.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1641 const scoped_refptr<StreamParserBuffer>& buffer = *it; | 1641 const scoped_refptr<StreamParserBuffer>& buffer = *it; |
1642 if (buffer->timestamp() <= max_splice_end_timestamp && | 1642 if (buffer->timestamp() <= max_splice_end_timestamp && |
1643 (buffer->timestamp() < overlapping_buffer->timestamp() || | 1643 (buffer->timestamp() < overlapping_buffer->timestamp() || |
1644 buffer == overlapping_buffer)) { | 1644 buffer == overlapping_buffer)) { |
1645 // Add the buffer and adjust the index forward to compensate. | 1645 // Add the buffer and adjust the index forward to compensate. |
1646 pre_splice_buffers.insert(pre_splice_buffers.begin() + ++i, buffer); | 1646 pre_splice_buffers.insert(pre_splice_buffers.begin() + ++i, buffer); |
1647 } | 1647 } |
1648 } | 1648 } |
1649 } | 1649 } |
1650 | 1650 |
1651 if (new_buffers.front()->timestamp() == media_segment_start_time_) | |
1652 media_segment_start_time_ = pre_splice_buffers.front()->timestamp(); | |
acolwell GONE FROM CHROMIUM
2014/04/01 00:39:11
I believe this makes the crash go away, but it isn
DaleCurtis
2014/04/01 21:33:57
Your suggestion also fixes the issue. However add
| |
1653 | |
1651 new_buffers.front()->ConvertToSpliceBuffer(pre_splice_buffers); | 1654 new_buffers.front()->ConvertToSpliceBuffer(pre_splice_buffers); |
1652 } | 1655 } |
1653 | 1656 |
1654 SourceBufferRange::SourceBufferRange( | 1657 SourceBufferRange::SourceBufferRange( |
1655 SourceBufferStream::Type type, const BufferQueue& new_buffers, | 1658 SourceBufferStream::Type type, const BufferQueue& new_buffers, |
1656 base::TimeDelta media_segment_start_time, | 1659 base::TimeDelta media_segment_start_time, |
1657 const InterbufferDistanceCB& interbuffer_distance_cb) | 1660 const InterbufferDistanceCB& interbuffer_distance_cb) |
1658 : type_(type), | 1661 : type_(type), |
1659 keyframe_map_index_base_(0), | 1662 keyframe_map_index_base_(0), |
1660 next_buffer_index_(-1), | 1663 next_buffer_index_(-1), |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2172 if (buffer->end_of_stream() || buffer->timestamp() >= end) | 2175 if (buffer->end_of_stream() || buffer->timestamp() >= end) |
2173 break; | 2176 break; |
2174 if (buffer->timestamp() + buffer->duration() <= start) | 2177 if (buffer->timestamp() + buffer->duration() <= start) |
2175 continue; | 2178 continue; |
2176 buffers->push_back(buffer); | 2179 buffers->push_back(buffer); |
2177 } | 2180 } |
2178 return previous_size < buffers->size(); | 2181 return previous_size < buffers->size(); |
2179 } | 2182 } |
2180 | 2183 |
2181 } // namespace media | 2184 } // namespace media |
OLD | NEW |