Commit d55028e4 authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Rémi Denis-Courmont

sout: enforce discontinuity flag after flush

Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent 2175a7d7
......@@ -163,6 +163,7 @@ sout_packetizer_input_t *sout_InputNew( sout_instance_t *p_sout,
return NULL;
p_input->p_sout = p_sout;
p_input->b_flushed = false;
msg_Dbg( p_sout, "adding a new sout input for `%4.4s` (sout_input: %p)",
(char*) &p_fmt->i_codec, (void *)p_input );
......@@ -221,6 +222,7 @@ void sout_InputFlush( sout_packetizer_input_t *p_input )
vlc_mutex_lock( &p_sout->lock );
sout_StreamFlush( p_sout->p_stream, p_input->id );
vlc_mutex_unlock( &p_sout->lock );
p_input->b_flushed = true;
}
/*****************************************************************************
......@@ -232,6 +234,11 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input,
sout_instance_t *p_sout = p_input->p_sout;
int i_ret;
if( p_input->b_flushed )
{
p_buffer->i_flags |= BLOCK_FLAG_DISCONTINUITY;
p_input->b_flushed = false;
}
vlc_mutex_lock( &p_sout->lock );
i_ret = sout_StreamIdSend( p_sout->p_stream, p_input->id, p_buffer );
vlc_mutex_unlock( &p_sout->lock );
......
......@@ -38,6 +38,7 @@ struct sout_packetizer_input_t
sout_instance_t *p_sout;
void *id;
bool b_flushed;
};
sout_instance_t *sout_NewInstance( vlc_object_t *, const char * );
......
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