Commit 297529bf authored by Jean-Paul Saman's avatar Jean-Paul Saman

mux/mpeg/ts.c: splice_point generation fixes

Only generate splice points for VIDEO_ES and AUDIO_ES.
parent a3e0b6ca
...@@ -979,7 +979,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -979,7 +979,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream->i_codec = p_input->p_fmt->i_codec; p_stream->i_codec = p_input->p_fmt->i_codec;
p_stream->i_continuity_counter = 0; p_stream->i_continuity_counter = 0;
p_stream->b_discontinuity = false; p_stream->b_discontinuity = false;
p_stream->b_splicing_point = true; p_stream->b_splicing_point = false;
p_stream->i_splice_countdown = 0; p_stream->i_splice_countdown = 0;
p_stream->i_decoder_specific_info = 0; p_stream->i_decoder_specific_info = 0;
p_stream->p_decoder_specific_info = NULL; p_stream->p_decoder_specific_info = NULL;
...@@ -1034,6 +1034,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -1034,6 +1034,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
free( p_stream ); free( p_stream );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_stream->b_splicing_point = true;
p_sys->i_video_bound++; p_sys->i_video_bound++;
break; break;
...@@ -1074,6 +1075,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -1074,6 +1075,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
free( p_stream ); free( p_stream );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_stream->b_splicing_point = true;
p_sys->i_audio_bound++; p_sys->i_audio_bound++;
break; break;
...@@ -2077,8 +2079,8 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream, ...@@ -2077,8 +2079,8 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream,
/* in (+) or out (-) point */ /* in (+) or out (-) point */
p_ts->p_buffer[12] = p_stream->i_splice_countdown > 0 ? p_ts->p_buffer[12] = p_stream->i_splice_countdown > 0 ?
(0x80 | (p_stream->i_splice_countdown & 0x7f)) : 0; (0x80 | (p_stream->i_splice_countdown & 0x7f)) : 0;
p_stream->b_splicing_point = !(p_stream->i_splice_countdown == 127);
p_stream->i_splice_countdown++; p_stream->i_splice_countdown++;
p_stream->b_splicing_point = (p_stream->i_splice_countdown >= 127) ? false : true;
} }
for( i = i_stuffing_start; i < i_stuffing_start + i_stuffing; i++ ) for( i = i_stuffing_start; i < i_stuffing_start + i_stuffing; i++ )
...@@ -2101,7 +2103,7 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream, ...@@ -2101,7 +2103,7 @@ static block_t *TSNew( sout_mux_t *p_mux, ts_stream_t *p_stream,
/* in (+) or out (-) point */ /* in (+) or out (-) point */
p_ts->p_buffer[6] = p_stream->i_splice_countdown > 0 ? p_ts->p_buffer[6] = p_stream->i_splice_countdown > 0 ?
(0x80 | (p_stream->i_splice_countdown & 0x7f)) : 0; (0x80 | (p_stream->i_splice_countdown & 0x7f)) : 0;
p_stream->b_splicing_point = !(p_stream->i_splice_countdown == 127); p_stream->b_splicing_point = (p_stream->i_splice_countdown >= 127) ? false : true;
p_stream->i_splice_countdown++; p_stream->i_splice_countdown++;
} }
......
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