summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-08 05:09:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-08 05:28:51 +0100
commitc61b84ccfda148c325766ee82f26f9231a893420 (patch)
tree662aedaf1f9ed26ea338616163c19fd1dc272fcf /doc
parent1d2410639d9da4e7711a79f03d1ce512195aff88 (diff)
downloadffmpeg-c61b84ccfda148c325766ee82f26f9231a893420.tar.gz
doc/examples/transcode_aac: Use avio_closep() in examples as it avoids leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/transcode_aac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c
index e98c217356..6998aac72b 100644
--- a/doc/examples/transcode_aac.c
+++ b/doc/examples/transcode_aac.c
@@ -199,7 +199,7 @@ static int open_output_file(const char *filename,
return 0;
cleanup:
- avio_close((*output_format_context)->pb);
+ avio_closep(&(*output_format_context)->pb);
avformat_free_context(*output_format_context);
*output_format_context = NULL;
return error < 0 ? error : AVERROR_EXIT;
@@ -743,7 +743,7 @@ cleanup:
if (output_codec_context)
avcodec_close(output_codec_context);
if (output_format_context) {
- avio_close(output_format_context->pb);
+ avio_closep(&output_format_context->pb);
avformat_free_context(output_format_context);
}
if (input_codec_context)