Commit 62229a3b authored by Rafaël Carré's avatar Rafaël Carré

avformat mux: don't write trailer if writing header failed

parent 3a50918d
......@@ -173,7 +173,7 @@ void CloseMux( vlc_object_t *p_this )
sout_mux_t *p_mux = (sout_mux_t*)p_this;
sout_mux_sys_t *p_sys = p_mux->p_sys;
if( !p_sys->b_write_header && av_write_trailer( p_sys->oc ) < 0 )
if( !p_sys->b_write_header && !p_sys->b_error && av_write_trailer( p_sys->oc ) < 0 )
{
msg_Err( p_mux, "could not write trailer" );
}
......
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