[vlc-commits] avformat mux: don't write trailer if writing header failed

Rafaël Carré git at videolan.org
Sun Jan 29 19:07:25 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Sat Jan 28 21:52:04 2012 -0500| [fd433550afd7c0fbd826910d86e1274154becb60] | committer: Jean-Baptiste Kempf

avformat mux: don't write trailer if writing header failed
(cherry picked from commit 62229a3b5c564b9d3c6401fe731a70c4504e6f14)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=fd433550afd7c0fbd826910d86e1274154becb60
---

 modules/demux/avformat/mux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 9c87073..d913bf1 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -173,7 +173,7 @@ void CloseMux( vlc_object_t *p_this )
     sout_mux_sys_t *p_sys = p_mux->p_sys;
     unsigned int i;
 
-    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" );
     }



More information about the vlc-commits mailing list