Commit f54b735a authored by Jean-Paul Saman's avatar Jean-Paul Saman

mux/mpeg/ts.c: write splice_countdown field when no pcr, but b_splice_point is true

In case there was no pcr but a splice point must be generated, then the
adaptation field generation code looked at the stuffing byte size. However
just before deciding an adaptation field was needed the adaptation field
length was properly adjusted to include a splice_countdown field.
parent 297529bf
...@@ -2094,8 +2094,6 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream, ...@@ -2094,8 +2094,6 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream,
int i_stuffing_start = b_splicing_point ? 7 : 6; int i_stuffing_start = b_splicing_point ? 7 : 6;
p_ts->p_buffer[4] = i_stuffing + (b_splicing_point ? 2 : -1); p_ts->p_buffer[4] = i_stuffing + (b_splicing_point ? 2 : -1);
if( i_stuffing > 1 )
{
p_ts->p_buffer[5] = 0x00; p_ts->p_buffer[5] = 0x00;
if( b_splicing_point ) if( b_splicing_point )
{ {
...@@ -2107,6 +2105,8 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream, ...@@ -2107,6 +2105,8 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream,
p_stream->i_splice_countdown++; p_stream->i_splice_countdown++;
} }
if( i_stuffing > 1 )
{
for( i = i_stuffing_start; i < i_stuffing_start + i_stuffing; i++ ) for( i = i_stuffing_start; i < i_stuffing_start + i_stuffing; i++ )
{ {
p_ts->p_buffer[i] = 0xff; p_ts->p_buffer[i] = 0xff;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment