avcodec/mimic: use av_freep() and reset swap_buf_size