aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/textformat/avtextformat.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-04-15 02:31:28 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-04-16 06:13:13 +0200
commita888975a3c25760027cd59932f5c1ad04368db8b (patch)
treed0a3c4069309c4b4dc3a0186ae014e4d26548276 /fftools/textformat/avtextformat.c
parent37635d31cbbf14c0ed7b918babc12cff8d03be5a (diff)
downloadffmpeg-a888975a3c25760027cd59932f5c1ad04368db8b.tar.gz
fftools/textformat/avtextformat: Make close functions return void
Just like normal close functions. Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools/textformat/avtextformat.c')
-rw-r--r--fftools/textformat/avtextformat.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fftools/textformat/avtextformat.c b/fftools/textformat/avtextformat.c
index 5abf81194e..44085fc87a 100644
--- a/fftools/textformat/avtextformat.c
+++ b/fftools/textformat/avtextformat.c
@@ -99,14 +99,13 @@ static void bprint_bytes(AVBPrint *bp, const uint8_t *ubuf, size_t ubuf_size)
av_bprintf(bp, "%02X", ubuf[i]);
}
-int avtext_context_close(AVTextFormatContext **ptctx)
+void avtext_context_close(AVTextFormatContext **ptctx)
{
AVTextFormatContext *tctx = *ptctx;
int i;
- int ret = 0;
if (!tctx)
- return AVERROR(EINVAL);
+ return;
av_hash_freep(&tctx->hash);
@@ -123,7 +122,6 @@ int avtext_context_close(AVTextFormatContext **ptctx)
av_freep(&tctx->priv);
av_opt_free(tctx);
av_freep(ptctx);
- return ret;
}
@@ -584,13 +582,13 @@ static const AVClass textwriter_class = {
};
-int avtextwriter_context_close(AVTextWriterContext **pwctx)
+void avtextwriter_context_close(AVTextWriterContext **pwctx)
{
AVTextWriterContext *wctx = *pwctx;
int ret = 0;
if (!wctx)
- return AVERROR(EINVAL);
+ return;
if (wctx->writer) {
if (wctx->writer->uninit)
@@ -600,7 +598,6 @@ int avtextwriter_context_close(AVTextWriterContext **pwctx)
}
av_freep(&wctx->priv);
av_freep(pwctx);
- return ret;
}