Generate sidx box only if there are more than one entries
Change-Id: If7d7440f18e8b50a3261e18138b1a40bd754aba7
This commit is contained in:
parent
3e6190ec2b
commit
05db9e02b9
|
@ -158,8 +158,9 @@ Status MultiSegmentSegmenter::WriteSegment() {
|
||||||
styp_->Write(buffer.get());
|
styp_->Write(buffer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If num_subsegments_per_sidx is negative, no SIDX box is generated.
|
// Generate sidx box only if |num_subsegments_per_sidx| is non-negative and
|
||||||
if (options().num_subsegments_per_sidx >= 0)
|
// the box contains multiple entries.
|
||||||
|
if (options().num_subsegments_per_sidx >= 0 && sidx()->references.size() > 1)
|
||||||
sidx()->Write(buffer.get());
|
sidx()->Write(buffer.get());
|
||||||
|
|
||||||
const size_t segment_size = buffer->Size() + fragment_buffer()->Size();
|
const size_t segment_size = buffer->Size() + fragment_buffer()->Size();
|
||||||
|
|
Loading…
Reference in New Issue