From 07d2d063954251bdefe34d7d1f8de751eec606be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Mon, 17 Sep 2012 21:16:32 +0200 Subject: [PATCH] Remove code that duplicates existing code a few lines down. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also fixes a potential crash since s->pb can be NULL. Signed-off-by: Reimar Döffinger --- libavformat/utils.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 7152401de8..f6a20caa1b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3787,9 +3787,6 @@ int av_write_trailer(AVFormatContext *s) if (s->oformat->write_trailer) ret = s->oformat->write_trailer(s); - if (!(s->oformat->flags & AVFMT_NOFILE)) - avio_flush(s->pb); - fail: if (s->pb) avio_flush(s->pb);