Commit 4a0a8058 authored by François Cartegnie's avatar François Cartegnie 🤞

mux: mp4: don't create edts if no valid data/timestamp has been sent

otherwise creates offset from TS_INVALID
parent c2f26899
......@@ -602,10 +602,13 @@ static int Mux(sout_mux_t *p_mux)
/* Reset reference dts in case of discontinuity (ex: gather sout) */
if (p_data->i_flags & BLOCK_FLAG_DISCONTINUITY && p_stream->mux.i_entry_count)
{
if(!CreateCurrentEdit(p_stream, p_sys->i_start_dts, p_sys->b_fragmented))
if(p_stream->i_first_dts != VLC_TS_INVALID)
{
block_Release( p_data );
return VLC_ENOMEM;
if(!CreateCurrentEdit(p_stream, p_sys->i_start_dts, p_sys->b_fragmented))
{
block_Release( p_data );
return VLC_ENOMEM;
}
}
p_stream->i_length_neg = 0;
......
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