kopia lustrzana https://github.com/kierank/libmpegts
Improve multi-packet SDT and PMT
rodzic
11b87d850c
commit
2bd243347e
|
@ -292,10 +292,10 @@ int write_sdt( ts_writer_t *w )
|
|||
bytes_left = 184;
|
||||
|
||||
/* keep writing SDT packets */
|
||||
while( length > bytes_left )
|
||||
while( length > 0 )
|
||||
{
|
||||
start = bs_pos( s );
|
||||
write_packet_header( w, s, 1, SDT_PID, PAYLOAD_ONLY, &w->sdt->cc );
|
||||
write_packet_header( w, s, 0, SDT_PID, PAYLOAD_ONLY, &w->sdt->cc );
|
||||
write_bytes( s, &sdt_buf[pos], MIN( bytes_left, length ) );
|
||||
write_padding( s, start );
|
||||
pos += MIN( bytes_left, length );
|
||||
|
|
|
@ -608,7 +608,7 @@ static int write_pmt( ts_writer_t *w, ts_int_program_t *program )
|
|||
bytes_left = 184;
|
||||
|
||||
/* queue up pmt packets for spaced output */
|
||||
while( length > bytes_left )
|
||||
while( length > 0 )
|
||||
{
|
||||
bs_t z;
|
||||
|
||||
|
@ -1935,6 +1935,9 @@ int ts_close_writer( ts_writer_t *w )
|
|||
|
||||
free( w->buffered_frames );
|
||||
|
||||
if( w->sdt )
|
||||
free( w->sdt );
|
||||
|
||||
if( w->pcr_list )
|
||||
free( w->pcr_list );
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue