diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-08 14:13:36 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-08 14:13:36 +0100 |
commit | b565fd44642c210ff7ee600f60548895ee609fa3 (patch) | |
tree | df19ce1c3b58fb947e102454e32dd814d2d03d56 | |
parent | e5993aeb606e9748dc223907b86c1218a49c67c6 (diff) | |
download | ffmpeg-b565fd44642c210ff7ee600f60548895ee609fa3.tar.gz |
avformat/hdsenc: Simplify code by using avio_closep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/hdsenc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index a161b642c9..40520283f9 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -140,8 +140,7 @@ static void hds_free(AVFormatContext *s) for (i = 0; i < s->nb_streams; i++) { OutputStream *os = &c->streams[i]; if (os->out) - avio_close(os->out); - os->out = NULL; + avio_closep(&os->out); if (os->ctx && os->ctx_inited) av_write_trailer(os->ctx); if (os->ctx && os->ctx->pb) @@ -311,8 +310,7 @@ static void close_file(OutputStream *os) avio_seek(os->out, 0, SEEK_SET); avio_wb32(os->out, pos); avio_flush(os->out); - avio_close(os->out); - os->out = NULL; + avio_closep(&os->out); } static int hds_write_header(AVFormatContext *s) |