Merge pull request #685 from sidgairo18/fix_defects

Fix defects
This commit is contained in:
Carlos Fernandez Sanz 2017-02-15 09:29:25 -08:00 committed by GitHub
commit 1124d82687
2 changed files with 6 additions and 1 deletions

View File

@ -143,7 +143,10 @@ GF_Err stbl_AddDTS(GF_SampleTableBox *stbl, u64 DTS, u32 *sampleNumber, u32 Last
if (stts->nb_entries + 2 >= stts->alloc_size) {
stts->alloc_size += 2;
stts->entries = gf_realloc(stts->entries, sizeof(GF_SttsEntry)*stts->alloc_size);
if (!stts->entries) return GF_OUT_OF_MEM;
if (!stts->entries){
gf_free(DTSs);
return GF_OUT_OF_MEM;
}
memset(&stts->entries[stts->nb_entries], 0, sizeof(GF_SttsEntry)*(stts->alloc_size - stts->nb_entries));
}

View File

@ -291,6 +291,8 @@ void net_send_epg(
if (write_block(srv_sd, EPG_DATA, epg, len) <= 0)
fprintf(stderr, "Can't send EPG data\n");
free(epg);
return;
}