1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge branch '2.0release' into develop

This commit is contained in:
winlin 2017-01-10 17:17:31 +08:00
commit ae1920e91a
4 changed files with 91 additions and 64 deletions

View file

@ -3022,7 +3022,7 @@ int SrsTsCache::do_cache_avc(SrsAvcAacCodec* codec, SrsCodecSample* sample)
static u_int8_t aud_nalu_7[] = { 0x09, 0xf0};
// For NonIDR(open gop), we directly appends all frames.
if (sample->has_non_idr || (sample->has_aud && sample->has_sei)) {
if (sample->open_gop) {
for (int i = 0; i < sample->nb_sample_units; i++) {
SrsCodecSampleUnit* sample_unit = &sample->sample_units[i];
int32_t size = sample_unit->size;
@ -3144,6 +3144,8 @@ int SrsTsEncoder::initialize(SrsFileWriter* fw)
return ret;
}
sample->reset();
return ret;
}