diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 44d7b2a9cc..4b10f91660 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -777,7 +777,7 @@ static int do_encrypt(AVFormatContext *s, VariantStream *vs) return ret; avio_seek(pb, 0, SEEK_CUR); avio_write(pb, key, KEYSIZE); - avio_close(pb); + ff_format_io_close(s, &pb); } return 0; }