From 837e80b8e71c22f2a6acca1c2e6554a44533b231 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Thu, 21 Jan 2010 10:08:32 +0100 Subject: [PATCH] avformat mux: only write trailer if header was written --- modules/demux/avformat/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c index aadcbff1b6..cd4049251c 100644 --- a/modules/demux/avformat/mux.c +++ b/modules/demux/avformat/mux.c @@ -174,7 +174,7 @@ void CloseMux( vlc_object_t *p_this ) sout_mux_sys_t *p_sys = p_mux->p_sys; unsigned int i; - if( av_write_trailer( p_sys->oc ) < 0 ) + if( !p_sys->b_write_header && av_write_trailer( p_sys->oc ) < 0 ) { msg_Err( p_mux, "could not write trailer" ); } -- 2.39.2