diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-09 13:40:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-09 13:40:09 +0100 |
commit | ef3a6a48b56dce552f4bc8b60403d2d53484c2f8 (patch) | |
tree | 78bc15f2e84aa1207a6176b0e69eb6b594552b95 /libavformat/tee.c | |
parent | 643dee846addc190fe2596ca8d9b53bafeba080f (diff) | |
download | ffmpeg-ef3a6a48b56dce552f4bc8b60403d2d53484c2f8.tar.gz |
avformat/tee: Simplify code by using avio_closep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r-- | libavformat/tee.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/tee.c b/libavformat/tee.c index 681f94330a..e3d466a3eb 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -305,8 +305,7 @@ static void close_slaves(AVFormatContext *avf) av_freep(&tee->slaves[i].stream_map); av_freep(&tee->slaves[i].bsfs); - avio_close(avf2->pb); - avf2->pb = NULL; + avio_closep(&avf2->pb); avformat_free_context(avf2); tee->slaves[i].avf = NULL; } @@ -437,10 +436,9 @@ static int tee_write_trailer(AVFormatContext *avf) if (!ret_all) ret_all = ret; if (!(avf2->oformat->flags & AVFMT_NOFILE)) { - if ((ret = avio_close(avf2->pb)) < 0) + if ((ret = avio_closep(&avf2->pb)) < 0) if (!ret_all) ret_all = ret; - avf2->pb = NULL; } } close_slaves(avf); |