avformat/sapenc: Use avio_closep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-09 13:39:48 +01:00
parent 2959a61232
commit 643dee846a
1 changed files with 1 additions and 1 deletions

View 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;
}