avformat/sapenc: Use avio_closep() to avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 12:39:48 +0000 (13:39 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 12:39:48 +0000 (13:39 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/sapenc.c

index f909557..07fbf48 100644 (file)
@@ -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;
     }