aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-08 14:10:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-08 14:10:23 +0100
commit558cef88605447156cd23b8780a34f930b1c1877 (patch)
treeae577b65a103989687b5e7257b22a10909f713bc
parenta85f033149a680cff101caea82d95577e4bd10ca (diff)
downloadffmpeg-558cef88605447156cd23b8780a34f930b1c1877.tar.gz
ffmpeg_opt: Use avio_closep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg_opt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index dcd751d195..5c4df8cd19 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1121,7 +1121,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
av_dict_set(&ost->encoder_opts, buf, arg, AV_DICT_DONT_OVERWRITE);
av_free(buf);
} while (!s->eof_reached);
- avio_close(s);
+ avio_closep(&s);
}
if (ret) {
av_log(NULL, AV_LOG_FATAL,
@@ -2017,7 +2017,7 @@ loop_end:
p = strrchr(o->attachments[i], '/');
av_dict_set(&ost->st->metadata, "filename", (p && *p) ? p + 1 : o->attachments[i], AV_DICT_DONT_OVERWRITE);
- avio_close(pb);
+ avio_closep(&pb);
}
for (i = nb_output_streams - oc->nb_streams; i < nb_output_streams; i++) { //for all streams of this output file