1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

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>
This commit is contained in:
Andreas Rheinhardt
2025-04-15 02:31:28 +02:00
parent 37635d31cb
commit a888975a3c
4 changed files with 9 additions and 20 deletions

View File

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