You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/tee: Simplify code by using avio_closep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -305,8 +305,7 @@ static void close_slaves(AVFormatContext *avf)
|
|||||||
av_freep(&tee->slaves[i].stream_map);
|
av_freep(&tee->slaves[i].stream_map);
|
||||||
av_freep(&tee->slaves[i].bsfs);
|
av_freep(&tee->slaves[i].bsfs);
|
||||||
|
|
||||||
avio_close(avf2->pb);
|
avio_closep(&avf2->pb);
|
||||||
avf2->pb = NULL;
|
|
||||||
avformat_free_context(avf2);
|
avformat_free_context(avf2);
|
||||||
tee->slaves[i].avf = NULL;
|
tee->slaves[i].avf = NULL;
|
||||||
}
|
}
|
||||||
@@ -437,10 +436,9 @@ static int tee_write_trailer(AVFormatContext *avf)
|
|||||||
if (!ret_all)
|
if (!ret_all)
|
||||||
ret_all = ret;
|
ret_all = ret;
|
||||||
if (!(avf2->oformat->flags & AVFMT_NOFILE)) {
|
if (!(avf2->oformat->flags & AVFMT_NOFILE)) {
|
||||||
if ((ret = avio_close(avf2->pb)) < 0)
|
if ((ret = avio_closep(&avf2->pb)) < 0)
|
||||||
if (!ret_all)
|
if (!ret_all)
|
||||||
ret_all = ret;
|
ret_all = ret;
|
||||||
avf2->pb = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close_slaves(avf);
|
close_slaves(avf);
|
||||||
|
Reference in New Issue
Block a user