From 643dee846addc190fe2596ca8d9b53bafeba080f Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 9 Jan 2015 13:39:48 +0100
Subject: [PATCH] avformat/sapenc: Use avio_closep() to avoid leaving stale
 pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavformat/sapenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
index f90955790d4..07fbf48e979 100644
--- a/libavformat/sapenc.c
+++ b/libavformat/sapenc.c
@@ -49,7 +49,7 @@ static int sap_write_close(AVFormatContext *s)
         if (!rtpctx)
             continue;
         av_write_trailer(rtpctx);
-        avio_close(rtpctx->pb);
+        avio_closep(&rtpctx->pb);
         avformat_free_context(rtpctx);
         s->streams[i]->priv_data = NULL;
     }
-- 
GitLab