mpegts: I now have working table input (PAT) for tsfile

This commit is contained in:
Adam Sutton 2013-04-27 22:04:31 +01:00
parent 2672cc4acd
commit d4a8529581
4 changed files with 7 additions and 4 deletions

View file

@ -417,7 +417,7 @@ int mpegts_input_is_free ( mpegts_input_t *mi );
int mpegts_input_current_weight ( mpegts_input_t *mi );
void mpegts_table_dispatch
(mpegts_table_t *mt, const uint8_t *sec, int r);
(const uint8_t *sec, size_t r, void *mt);
void mpegts_table_release
(mpegts_table_t *mt);
void mpegts_table_add

View file

@ -148,7 +148,8 @@ mpegts_input_table_dispatch ( mpegts_mux_t *mm, mpegts_table_feed_t *mtf )
for (i = 0; i < len; i++) {
mt = vec[i];
if (!mt->mt_destroyed && mt->mt_pid == pid)
psi_section_reassemble(&mt->mt_sect, mtf->mtf_tsb, 0, NULL, mt);
psi_section_reassemble(&mt->mt_sect, mtf->mtf_tsb, 0,
mpegts_table_dispatch, mt);
mpegts_table_release(mt);
}
}

View file

@ -23,9 +23,10 @@
void
mpegts_table_dispatch
( mpegts_table_t *mt, const uint8_t *sec, int r )
( const uint8_t *sec, size_t r, void *aux )
{
int tid, len, ret;
mpegts_table_t *mt = aux;
int chkcrc = mt->mt_flags & MT_CRC;
if(mt->mt_destroyed)

View file

@ -125,7 +125,8 @@ psi_section_reassemble0(psi_section_t *ps, const uint8_t *data,
return -1;
ps->ps_offset = 0;
cb(ps->ps_data, tsize - (crc ? 4 : 0), opaque);
if (cb)
cb(ps->ps_data, tsize - (crc ? 4 : 0), opaque);
return len - excess;
}