Commit a0877648 authored by Jun Zhao's avatar Jun Zhao

examples/avio_reading: Use avio_context_free() to free AVIOContext

Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 26fd40b5
......@@ -117,11 +117,12 @@ int main(int argc, char *argv[])
end:
avformat_close_input(&fmt_ctx);
/* note: the internal buffer could have changed, and be != avio_ctx_buffer */
if (avio_ctx) {
if (avio_ctx)
av_freep(&avio_ctx->buffer);
av_freep(&avio_ctx);
}
avio_context_free(&avio_ctx);
av_file_unmap(buffer, buffer_size);
if (ret < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment