Fix for writing audio to first cluster.
If the muxer had audio frames that were earlier in time than the first video frame then the first cluster would not be initialized in time to write out the first audio frames. Change-Id: I6a2ca25a25c326a4215c307bdae666db9107e9b5
This commit is contained in:
parent
2d3461b4b3
commit
32227e70c1
@ -1601,9 +1601,11 @@ bool Segment::WriteFramesAll() {
|
||||
}
|
||||
|
||||
bool Segment::WriteFramesLessThan(uint64 timestamp) {
|
||||
if (frames_size_ > 0) {
|
||||
// Check |cluster_list_size_| to see if this is the first cluster. If it is
|
||||
// the first cluster the audio frames that are less than the first video
|
||||
// timesatmp will be written in a later step.
|
||||
if (frames_size_ > 0 && cluster_list_size_ > 0) {
|
||||
assert(frames_);
|
||||
assert(cluster_list_size_ > 0);
|
||||
Cluster* const cluster = cluster_list_[cluster_list_size_-1];
|
||||
assert(cluster);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user