srs
srs copied to clipboard
MP4: The first sample count has a problem in SrsMp4SampleManager::write_track
if (stts) {
if (previous) {
uint32_t delta = (uint32_t)(sample->dts - previous->dts);
if (stts_entry.sample_delta == 0 || stts_entry.sample_delta == delta) {
stts_entry.sample_delta = delta;
stts_entry.sample_count++;
} else {
stts_entries.push_back(stts_entry);
stts_entry.sample_count = 1;
stts_entry.sample_delta = delta;
}
} else {
// The first sample always in the STTS table.
stts_entry.sample_count++; // Does this line still need to be incremented here if it has already been done in the subsequent if (previous) statement? } }
TRANS_BY_GPT3
What problems will it cause? I can't remember specifically if it's necessary or not.
TRANS_BY_GPT3
Need more analysis. So much time has passed that it's as hard as possible for me to reminder.