ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Tue Apr 15 00:46:37 2025 +0200| [f73badbf47e7dc302f5914629a22e1f16ef0cfd3] | committer: Andreas Rheinhardt
fftools/textformat/tw_avio: Use avio_closep() Avoids leaving dangling pointers behind. Reviewed-by: softworkz . <softworkz-at-hotmail....@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f73badbf47e7dc302f5914629a22e1f16ef0cfd3 --- fftools/textformat/tw_avio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fftools/textformat/tw_avio.c b/fftools/textformat/tw_avio.c index f9fea24b19..a80b0d2588 100644 --- a/fftools/textformat/tw_avio.c +++ b/fftools/textformat/tw_avio.c @@ -40,9 +40,8 @@ static av_cold void iowriter_uninit(AVTextWriterContext *wctx) { IOWriterContext *ctx = wctx->priv; - if (ctx->close_on_uninit && ctx->avio_context) { - avio_close(ctx->avio_context); - } + if (ctx->close_on_uninit) + avio_closep(&ctx->avio_context); } static void io_w8(AVTextWriterContext *wctx, int b) _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".