mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
textformat/tw_avio: Remove close_on_uninit param from create_file
avtextwriter_create_file() creates an AVIOContext whose pointer resides in its private context. If it were not always closed on uninit, the AVIOContext would leak, so it makes no sense to have this parameter. Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -3161,7 +3161,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (output_filename) {
|
||||
ret = avtextwriter_create_file(&wctx, output_filename, 1);
|
||||
ret = avtextwriter_create_file(&wctx, output_filename);
|
||||
} else
|
||||
ret = avtextwriter_create_stdout(&wctx);
|
||||
|
||||
|
@ -61,7 +61,7 @@ int avtextwriter_create_stdout(AVTextWriterContext **pwctx);
|
||||
|
||||
int avtextwriter_create_avio(AVTextWriterContext **pwctx, AVIOContext *avio_ctx, int close_on_uninit);
|
||||
|
||||
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename, int close_on_uninit);
|
||||
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename);
|
||||
|
||||
int avtextwriter_create_buffer(AVTextWriterContext **pwctx, AVBPrint *buffer);
|
||||
|
||||
|
@ -76,7 +76,7 @@ const AVTextWriter avtextwriter_avio = {
|
||||
.writer_w8 = io_w8
|
||||
};
|
||||
|
||||
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename, int close_on_uninit)
|
||||
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename)
|
||||
{
|
||||
IOWriterContext *ctx;
|
||||
int ret;
|
||||
@ -95,7 +95,7 @@ int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_fil
|
||||
return ret;
|
||||
}
|
||||
|
||||
ctx->close_on_uninit = close_on_uninit;
|
||||
ctx->close_on_uninit = 1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user